diff options
author | Franck Bui <fbui@suse.com> | 2018-11-29 11:08:52 +0100 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2018-11-30 13:30:26 +0100 |
commit | fd74c6f3f83185f95dfb464db0f0a73ba69ec841 (patch) | |
tree | d08b9d326feb4bc1fedb038c66e485326ac98898 /src/basic/fs-util.h | |
parent | 0abf94923b4a95a7d89bc526efc84e7ca2b71741 (diff) | |
download | systemd-fd74c6f3f83185f95dfb464db0f0a73ba69ec841.tar.gz |
fs-util: add new CHASE_WARN flag to chase_symlinks()
This flag can be used to make chase_symlinks() emit a warning when it
encounters an error.
Such flag can be useful for generating a comprehensive and detailed warning
since chase_symlinks() can generate a warning with a full context.
For now only warnings for unsafe transitions are produced.
Diffstat (limited to 'src/basic/fs-util.h')
-rw-r--r-- | src/basic/fs-util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index 955b146a6a..7ad030be5d 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -74,6 +74,7 @@ enum { CHASE_TRAIL_SLASH = 1 << 5, /* If set, any trailing slash will be preserved */ CHASE_STEP = 1 << 6, /* If set, just execute a single step of the normalization */ CHASE_NOFOLLOW = 1 << 7, /* Only valid with CHASE_OPEN: when the path's right-most component refers to symlink return O_PATH fd of the symlink, rather than following it. */ + CHASE_WARN = 1 << 8, /* Emit an appropriate warning when an error is encountered */ }; /* How many iterations to execute before returning -ELOOP */ |