chiark / gitweb /
journald: don't recalculate the ACL mask
authorLennart Poettering <lennart@poettering.net>
Tue, 7 May 2013 17:07:27 +0000 (19:07 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 7 May 2013 17:20:26 +0000 (19:20 +0200)
Otherwise we might end up with executable files if some default ACL is
set for the journal directory.

src/journal/journald-server.c

index 88163c01167a19407bb38098ec28b768b3fb6773..cc52b8a5c9b4b9d64e4f02b5f9a1e273cc5916ed 100644 (file)
@@ -227,9 +227,9 @@ void server_fix_perms(Server *s, JournalFile *f, uid_t uid) {
                 }
         }
 
+        /* We do not recalculate the mask here, so that the fchmod() mask above stays intact. */
         if (acl_get_permset(entry, &permset) < 0 ||
-            acl_add_perm(permset, ACL_READ) < 0 ||
-            acl_calc_mask(&acl) < 0) {
+            acl_add_perm(permset, ACL_READ) < 0) {
                 log_warning("Failed to patch ACL on %s, ignoring: %m", f->path);
                 goto finish;
         }