1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00

tmpfiles: fix check for figuring out whether to call chmod()

No need to call chown() if everything matches already.
This commit is contained in:
Lennart Poettering 2018-01-22 21:11:04 +01:00
parent 59793c8f2e
commit dc2335669a

View File

@ -817,8 +817,8 @@ static int path_set_perms(Item *i, const char *path) {
}
}
if ((i->uid != st.st_uid || i->gid != st.st_gid) &&
(i->uid_set || i->gid_set)) {
if ((i->uid_set && i->uid != st.st_uid) ||
(i->gid_set && i->gid != st.st_gid)) {
log_debug("Changing \"%s\" to owner "UID_FMT":"GID_FMT,
path,
i->uid_set ? i->uid : UID_INVALID,