mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
conf: disable dumpdir and logdir by default
Use empty string instead of "." (which is normally the root directory) as the default value of dumpdir and logdir to indicate they are not specified. Print warnings in syslog when trying to log or dump measurements without dumpdir or logdir.
This commit is contained in:
10
conf.c
10
conf.c
@@ -330,8 +330,8 @@ CNF_Initialise(int r)
|
||||
ntp_restrictions = ARR_CreateInstance(sizeof (AllowDeny));
|
||||
cmd_restrictions = ARR_CreateInstance(sizeof (AllowDeny));
|
||||
|
||||
dumpdir = Strdup(".");
|
||||
logdir = Strdup(".");
|
||||
dumpdir = Strdup("");
|
||||
logdir = Strdup("");
|
||||
bind_cmd_path = Strdup(DEFAULT_COMMAND_SOCKET);
|
||||
pidfile = Strdup(DEFAULT_PID_FILE);
|
||||
rtc_device = Strdup(DEFAULT_RTC_DEVICE);
|
||||
@@ -1247,8 +1247,10 @@ CNF_CreateDirs(uid_t uid, gid_t gid)
|
||||
{
|
||||
char *dir;
|
||||
|
||||
UTI_CreateDirAndParents(logdir, 0755, uid, gid);
|
||||
UTI_CreateDirAndParents(dumpdir, 0755, uid, gid);
|
||||
if (logdir[0])
|
||||
UTI_CreateDirAndParents(logdir, 0755, uid, gid);
|
||||
if (dumpdir[0])
|
||||
UTI_CreateDirAndParents(dumpdir, 0755, uid, gid);
|
||||
|
||||
/* Create a directory for the Unix domain command socket */
|
||||
if (bind_cmd_path[0]) {
|
||||
|
||||
Reference in New Issue
Block a user