Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tmpfiles.c: prevent nftw follow symbolic links
When dealing with "L+" and "R", the function call 'nftw' should not follow symbolic links, otherwise, it would also delete the targets which is wrong. For instance, if there is already a symbolic link: ``` /path/to/the/link -> /path/to/some/folder ``` if we set the following in a tmpfile conf: ``` L+ /path/to/the/link - - - - /path/to/the/target ``` the result would be /path/to/some/folder also get deleted, which it should not. it could be even worse, when the symbolic link already is pointing to: /path/to/the/target, the whole /path/to/the/target would be deleted on next system boot. Signed-off-by: Mathias Thore <[email protected]> Signed-off-by: Ming Liu <[email protected]>
- Loading branch information