mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
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:
commit
fc874bf3bf
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user