Merge pull request #68 from rutsky/fix_mode_in_error_messages

fix permission values in error messages
This commit is contained in:
robertswiecki 2018-01-02 22:55:42 +01:00 committed by GitHub
commit 6e3993b9ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ static bool cgroupInitNsFromParentMem(struct nsjconf_t* nsjconf, pid_t pid) {
nsjconf->cgroup_mem_mount, nsjconf->cgroup_mem_parent, (int)pid); nsjconf->cgroup_mem_mount, nsjconf->cgroup_mem_parent, (int)pid);
LOG_D("Create '%s' for PID=%d", mem_cgroup_path, (int)pid); LOG_D("Create '%s' for PID=%d", mem_cgroup_path, (int)pid);
if (mkdir(mem_cgroup_path, 0700) == -1 && errno != EEXIST) { 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; 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); nsjconf->cgroup_pids_mount, nsjconf->cgroup_pids_parent, (int)pid);
LOG_D("Create '%s' for PID=%d", pids_cgroup_path, (int)pid); LOG_D("Create '%s' for PID=%d", pids_cgroup_path, (int)pid);
if (mkdir(pids_cgroup_path, 0700) == -1 && errno != EEXIST) { 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; 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); 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); LOG_D("Create '%s' for PID=%d", net_cls_cgroup_path, (int)pid);
if (mkdir(net_cls_cgroup_path, 0700) == -1 && errno != EEXIST) { 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; return false;
} }

View File

@ -152,7 +152,7 @@ static bool mountMount(struct mounts_t* mpt, const char* newroot, const char* tm
if (fd >= 0) { if (fd >= 0) {
close(fd); close(fd);
} else { } 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);
} }
} }