From 1542c01b1dd5e34bfc2355aba603131e458ee0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 13 Jun 2015 13:14:37 -0400 Subject: [PATCH] =?UTF-8?q?tmpfiles:=C2=A0only=20root-owned=20aquota.*=20f?= =?UTF-8?q?iles=20are=20special?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #188. --- src/tmpfiles/tmpfiles.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 027a5c2ca80..42f757c4b70 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -496,9 +496,10 @@ static int dir_cleanup( } if (mountpoint && S_ISREG(s.st_mode)) - if ((streq(dent->d_name, ".journal") && s.st_uid == 0) || - streq(dent->d_name, "aquota.user") || - streq(dent->d_name, "aquota.group")) { + if (s.st_uid == 0 && STR_IN_SET(dent->d_name, + ".journal", + "aquota.user", + "aquota.group")) { log_debug("Skipping \"%s\".", sub_path); continue; }