Merge pull request #17977 from yuwata/namespace-mount-procfs-follow-up

core/namespace: do not ignore non-EPERM mount error
This commit is contained in:
Yu Watanabe
2020-12-15 12:07:30 +09:00
committed by GitHub
+2 -3
View File
@@ -914,7 +914,8 @@ static int mount_procfs(const MountEntry *m, const NamespaceInfo *ns_info) {
if (r == 0)
/* /proc is not mounted. Propagate the original error code. */
return -EPERM;
}
} else if (r < 0)
return r;
return 1;
}
@@ -1691,12 +1692,10 @@ int setup_namespace(
*(m++) = (MountEntry) {
.path_const = "/proc/sys/kernel/hostname",
.mode = READONLY,
.ignore = true,
};
*(m++) = (MountEntry) {
.path_const = "/proc/sys/kernel/domainname",
.mode = READONLY,
.ignore = true,
};
}