1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +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 (mountpoint && S_ISREG(s.st_mode))
if ((streq(dent->d_name, ".journal") && s.st_uid == 0) || if (s.st_uid == 0 && STR_IN_SET(dent->d_name,
streq(dent->d_name, "aquota.user") || ".journal",
streq(dent->d_name, "aquota.group")) { "aquota.user",
"aquota.group")) {
log_debug("Skipping \"%s\".", sub_path); log_debug("Skipping \"%s\".", sub_path);
continue; continue;
} }