1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00

tmpfiles: improve error message for chown()/chmod() failures (#4969)

Let's make the error message less confusing here.

Fixes: #4954
This commit is contained in:
Lennart Poettering 2016-12-29 11:00:55 +01:00 committed by Martin Pitt
parent 9eb484fa40
commit e0bc1d70d9

View File

@ -649,7 +649,7 @@ static int path_set_perms(Item *i, const char *path) {
else {
log_debug("chmod \"%s\" to mode %o", path, m);
if (chmod(fn, m) < 0)
return log_error_errno(errno, "chmod(%s) failed: %m", path);
return log_error_errno(errno, "chmod() of %s via %s failed: %m", path, fn);
}
}
@ -662,7 +662,7 @@ static int path_set_perms(Item *i, const char *path) {
if (chown(fn,
i->uid_set ? i->uid : UID_INVALID,
i->gid_set ? i->gid : GID_INVALID) < 0)
return log_error_errno(errno, "chown(%s) failed: %m", path);
return log_error_errno(errno, "chown() of %s via %s failed: %m", path, fn);
}
}