1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

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

Fixes #188.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-06-13 13:14:37 -04:00 committed by Lennart Poettering
parent 3c222be831
commit 1542c01b1d

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;
}