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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user