summaryrefslogtreecommitdiff
path: root/src/tmpfiles.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-12-28 14:20:21 +0100
committerLennart Poettering <lennart@poettering.net>2010-12-28 14:21:28 +0100
commita247755d5221411ffe7780677b270963682dadd1 (patch)
tree3bae915f8243c8f52dfef023842dcc3778f506a0 /src/tmpfiles.c
parent5b8191986c5e00323315e61a53efadbf64de8161 (diff)
tmpfiles: ensure we do no follow symlinks when cleaning up dirs
Patch suggested by Miloslav Trmac.
Diffstat (limited to 'src/tmpfiles.c')
-rw-r--r--src/tmpfiles.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmpfiles.c b/src/tmpfiles.c
index 120236c5cc..1234cbf348 100644
--- a/src/tmpfiles.c
+++ b/src/tmpfiles.c
@@ -149,7 +149,7 @@ static int dir_cleanup(
DIR *sub_dir;
int q;
- sub_dir = xopendirat(dirfd(d), dent->d_name);
+ sub_dir = xopendirat(dirfd(d), dent->d_name, O_NOFOLLOW);
if (sub_dir == NULL) {
if (errno != ENOENT) {
log_error("opendir(%s/%s) failed: %m", p, dent->d_name);