From: 2xsec Date: Fri, 2 Nov 2018 06:25:14 +0000 (+0900) Subject: log: fix too wide or inconsistent non-owner permissions X-Git-Tag: lxc-4.0.0~369^2 X-Git-Url: https://git.proxmox.com/?p=mirror_lxc.git;a=commitdiff_plain;h=9b681921e597541226eb9ecccb4a7d9e3f410879 log: fix too wide or inconsistent non-owner permissions Signed-off-by: 2xsec --- diff --git a/src/lxc/log.c b/src/lxc/log.c index 2f1a9385e..998f6517a 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -488,7 +488,7 @@ static int build_dir(const char *name) ret = lxc_unpriv(mkdir(n, 0755)); if (ret && errno != EEXIST) { - SYSERROR("Failed to create directory %s", n); + SYSERROR("Failed to create directory \"%s\"", n); free(n); return -1; } @@ -506,7 +506,7 @@ static int log_open(const char *name) int fd; int newfd; - fd = lxc_unpriv(open(name, O_CREAT | O_WRONLY | O_APPEND | O_CLOEXEC, 0666)); + fd = lxc_unpriv(open(name, O_CREAT | O_WRONLY | O_APPEND | O_CLOEXEC, 0660)); if (fd < 0) { SYSERROR("Failed to open log file \"%s\"", name); return -1;