From 9b681921e597541226eb9ecccb4a7d9e3f410879 Mon Sep 17 00:00:00 2001 From: 2xsec Date: Fri, 2 Nov 2018 15:25:14 +0900 Subject: [PATCH] log: fix too wide or inconsistent non-owner permissions Signed-off-by: 2xsec --- src/lxc/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2