mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35: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:
4
util.h
4
util.h
@@ -200,6 +200,10 @@ extern int UTI_CheckDirPermissions(const char *path, mode_t perm, uid_t uid, gid
|
||||
specified. It does not return error if it is not an accessible file. */
|
||||
extern int UTI_CheckFilePermissions(const char *path, mode_t perm);
|
||||
|
||||
/* Log a warning message if not having read access or having write access
|
||||
to a file/directory */
|
||||
extern void UTI_CheckReadOnlyAccess(const char *path);
|
||||
|
||||
/* Open a file. The full path of the file is constructed from the basedir
|
||||
(may be NULL), '/' (if basedir is not NULL), name, and suffix (may be NULL).
|
||||
Created files have specified permissions (umasked). Returns NULL on error.
|
||||
|
||||
Reference in New Issue
Block a user