mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 23:05:06 -05:00
conf: warn if not having read-only access to keys
After dropping root privileges, log a warning message if chronyd doesn't have read access or has (unnecessary) write access to the files containing symmetric and server NTS keys.
This commit is contained in:
13
conf.c
13
conf.c
@@ -1774,6 +1774,19 @@ CNF_CreateDirs(uid_t uid, gid_t gid)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
void
|
||||
CNF_CheckReadOnlyAccess(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
if (keys_file)
|
||||
UTI_CheckReadOnlyAccess(keys_file);
|
||||
for (i = 0; i < ARR_GetSize(nts_server_key_files); i++)
|
||||
UTI_CheckReadOnlyAccess(*(char **)ARR_GetElement(nts_server_key_files, i));
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
void
|
||||
CNF_AddInitSources(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user