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-23 21:19:00 +01:00
parent 59793c8f2e
commit dc2335669a
+2 -2
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,