core/namespace: ignore ENOENT for /proc/sys/kernel/domainname and hostname
If they do not exist, hostname or domainname cannot be modified. So, it is ok. Fixes #17866, especially https://github.com/systemd/systemd/issues/17866#issuecomment-744118614.
This commit is contained in:
parent
38abd1bfc5
commit
0ebc9f23fa
|
@ -1684,10 +1684,12 @@ int setup_namespace(
|
||||||
*(m++) = (MountEntry) {
|
*(m++) = (MountEntry) {
|
||||||
.path_const = "/proc/sys/kernel/hostname",
|
.path_const = "/proc/sys/kernel/hostname",
|
||||||
.mode = READONLY,
|
.mode = READONLY,
|
||||||
|
.ignore = true,
|
||||||
};
|
};
|
||||||
*(m++) = (MountEntry) {
|
*(m++) = (MountEntry) {
|
||||||
.path_const = "/proc/sys/kernel/domainname",
|
.path_const = "/proc/sys/kernel/domainname",
|
||||||
.mode = READONLY,
|
.mode = READONLY,
|
||||||
|
.ignore = true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue