chiark / gitweb /
tmpfiles: ignore files marked with the sticky bit
authorLennart Poettering <lennart@poettering.net>
Sun, 14 Nov 2010 19:12:51 +0000 (20:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 14 Nov 2010 19:12:51 +0000 (20:12 +0100)
TODO
src/tmpfiles.c

diff --git a/TODO b/TODO
index cb1296950ee45c73a456ae03465cbc32fa9273f0..ca39210f10bd65fbd2bfe543c44061ee9629354f 100644 (file)
--- 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
index 1ad5a01eab9eaf3abd32c8fa4d7340287c34498b..120236c5cc07490f03724b694e77e831f9987f92 100644 (file)
@@ -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)