From 87c19b803fc65ec6369d632b8a43cb14866c12a1 Mon Sep 17 00:00:00 2001 From: Vladimir Rutsky Date: Tue, 2 Jan 2018 22:43:45 +0100 Subject: [PATCH] fix permission values in error messages Signed-off-by: Vladimir Rutsky --- cgroup.c | 6 +++--- mount.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cgroup.c b/cgroup.c index 4e5a7b5..8683f04 100644 --- a/cgroup.c +++ b/cgroup.c @@ -43,7 +43,7 @@ static bool cgroupInitNsFromParentMem(struct nsjconf_t* nsjconf, pid_t pid) { nsjconf->cgroup_mem_mount, nsjconf->cgroup_mem_parent, (int)pid); LOG_D("Create '%s' for PID=%d", mem_cgroup_path, (int)pid); if (mkdir(mem_cgroup_path, 0700) == -1 && errno != EEXIST) { - PLOG_E("mkdir('%s', 0711) failed", mem_cgroup_path); + PLOG_E("mkdir('%s', 0700) failed", mem_cgroup_path); return false; } @@ -89,7 +89,7 @@ static bool cgroupInitNsFromParentPids(struct nsjconf_t* nsjconf, pid_t pid) { nsjconf->cgroup_pids_mount, nsjconf->cgroup_pids_parent, (int)pid); LOG_D("Create '%s' for PID=%d", pids_cgroup_path, (int)pid); if (mkdir(pids_cgroup_path, 0700) == -1 && errno != EEXIST) { - PLOG_E("mkdir('%s', 0711) failed", pids_cgroup_path); + PLOG_E("mkdir('%s', 0700) failed", pids_cgroup_path); return false; } @@ -125,7 +125,7 @@ static bool cgroupInitNsFromParentNetCls(struct nsjconf_t* nsjconf, pid_t pid) { nsjconf->cgroup_net_cls_mount, nsjconf->cgroup_net_cls_parent, (int)pid); LOG_D("Create '%s' for PID=%d", net_cls_cgroup_path, (int)pid); if (mkdir(net_cls_cgroup_path, 0700) == -1 && errno != EEXIST) { - PLOG_E("mkdir('%s', 0711) failed", net_cls_cgroup_path); + PLOG_E("mkdir('%s', 0700) failed", net_cls_cgroup_path); return false; } diff --git a/mount.c b/mount.c index 9d423e5..ac117b4 100644 --- a/mount.c +++ b/mount.c @@ -152,7 +152,7 @@ static bool mountMount(struct mounts_t* mpt, const char* newroot, const char* tm if (fd >= 0) { close(fd); } else { - PLOG_W("open('%s', O_CREAT|O_RDONLY|O_CLOEXEC, 0700)", dst); + PLOG_W("open('%s', O_CREAT|O_RDONLY|O_CLOEXEC, 0644)", dst); } }