[systemd-commits] src/tmpfiles.c TODO

Lennart Poettering lennart at kemper.freedesktop.org
Sun Nov 14 11:12:58 PST 2010


 TODO           |    2 --
 src/tmpfiles.c |    7 +++++++
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 9c73736da85110ca73d141b5acff6f4989092c07
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Nov 14 20:12:51 2010 +0100

    tmpfiles: ignore files marked with the sticky bit

diff --git a/TODO b/TODO
index cb12969..ca39210 100644
--- a/TODO
+++ b/TODO
@@ -78,8 +78,6 @@
 
 * in the PAM module rely on loginuid to figure out XDG_RUNTIME_DIR
 
-* tmpfiles: skip sticky files and after wallclock time change
-
 Pre v12:
 
 * fsck-root.service/start gets queued twice
diff --git a/src/tmpfiles.c b/src/tmpfiles.c
index 1ad5a01..120236c 100644
--- a/src/tmpfiles.c
+++ b/src/tmpfiles.c
@@ -182,6 +182,13 @@ static int dir_cleanup(
                         }
 
                 } else {
+                        /* Skip files for which the sticky bit is
+                         * set. These are semantics we define, and are
+                         * unknown elsewhere. See XDG_RUNTIME_DIR
+                         * specification for details. */
+                        if (s.st_mode & S_ISVTX)
+                                continue;
+
                         if (mountpoint) {
                                 if (streq(dent->d_name, ".journal") &&
                                     s.st_uid == 0)



More information about the systemd-commits mailing list