tmpfiles: only root-owned aquota.* files are special

Fixes #188.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2015-06-17 15:46:32 +02:00
committed by Lennart Poettering
parent 3c222be831
commit 1542c01b1d
+4 -3
View File
@@ -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;
}