util: don't try to create current directory
This prevents error messages when running chronyd -d/-q/-Q with default logdir in a directory chronyd is not allowed do access after dropping the root privileges.
This commit is contained in:
parent
92706b158e
commit
9a83cab2f8
1 changed files with 4 additions and 0 deletions
4
util.c
4
util.c
|
@ -931,6 +931,10 @@ UTI_CreateDirAndParents(const char *path)
|
|||
char *p;
|
||||
int i, j, k, last;
|
||||
|
||||
/* Don't try to create current directory */
|
||||
if (!strcmp(path, "."))
|
||||
return 1;
|
||||
|
||||
p = (char *)Malloc(1 + strlen(path));
|
||||
|
||||
i = k = 0;
|
||||
|
|
Loading…
Reference in a new issue