]> git.proxmox.com Git - mirror_lxc.git/commitdiff
log: fix too wide or inconsistent non-owner permissions
author2xsec <dh48.jeong@samsung.com>
Fri, 2 Nov 2018 06:25:14 +0000 (15:25 +0900)
committer2xsec <dh48.jeong@samsung.com>
Fri, 2 Nov 2018 06:25:14 +0000 (15:25 +0900)
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
src/lxc/log.c

index 2f1a9385e17f5d18dd546ee0bb9e01e6547f0a02..998f6517afceedf629b645f764f07548de92c420 100644 (file)
@@ -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;