mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 23:15:07 -05:00
util: print expected uid/gid in UTI_CheckDirPermissions()
This commit is contained in:
9
util.c
9
util.c
@@ -1058,8 +1058,13 @@ UTI_CheckDirPermissions(const char *path, mode_t perm, uid_t uid, gid_t gid)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf.st_uid != uid || buf.st_gid != gid) {
|
if (buf.st_uid != uid) {
|
||||||
LOG(LOGS_ERR, LOGF_Util, "Wrong owner/group of %s", path);
|
LOG(LOGS_ERR, LOGF_Util, "Wrong owner of %s (%s != %d)", path, "UID", uid);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buf.st_gid != gid) {
|
||||||
|
LOG(LOGS_ERR, LOGF_Util, "Wrong owner of %s (%s != %d)", path, "GID", gid);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user