diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-11-29 18:02:45 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-12-01 00:25:51 +0100 |
commit | a9fb08670f392e044c345b623e70287f6c6a02c1 (patch) | |
tree | b473f23d7d27e75e5b5052dbdb0a40029979422d /src/libsystemd/Makefile | |
parent | c4f4fce79e157800212f3cba1b21870097030e81 (diff) |
fs-util: add new CHASE_NON_EXISTING flag to chase_symlinks()
This new flag controls whether to consider a problem if the referenced path
doesn't actually exist. If specified it's OK if the final file doesn't exist.
Note that this permits one or more final components of the path not to exist,
but these must not contain "../" for safety reasons (or, to be extra safe,
neither "./" and a couple of others, i.e. what path_is_safe() permits).
This new flag is useful when resolving paths before issuing an mkdir() or
open(O_CREAT) on a path, as it permits that the file or directory is created
later.
The return code of chase_symlinks() is changed to return 1 if the file exists,
and 0 if it doesn't. The latter is only returned in case CHASE_NON_EXISTING is
set.
Diffstat (limited to 'src/libsystemd/Makefile')
0 files changed, 0 insertions, 0 deletions