summaryrefslogtreecommitdiff
path: root/src/binfmt
diff options
context:
space:
mode:
authorAlban Crequy <alban@endocode.com>2015-03-31 17:14:48 +0200
committerLennart Poettering <lennart@poettering.net>2015-03-31 17:21:03 +0200
commit81f5049b7c35752182e855cdb06d707db92d7ac8 (patch)
tree8043f5c94ac2053b0f6296b1ec61329fb9409932 /src/binfmt
parent4f923a1984476de3441922ee5bf7102ebdd250ef (diff)
nspawn: fallback on bind mount when mknod fails
Some systems abusively restrict mknod, even when the device node already exists in /dev. This is unfortunate because it prevents systemd-nspawn from creating the basic devices in /dev in the container. This patch implements a workaround: when mknod fails, fallback on bind mounts. Additionally, /dev/console was created with a mknod with the same major/minor as /dev/null before bind mounting a pts on it. This patch removes the mknod and creates an empty regular file instead. In order to test this patch, I used the following configuration, which I think should replicate the system with the abusive restriction on mknod: # grep devices /proc/self/cgroup 4:devices:/user.slice/restrict # cat /sys/fs/cgroup/devices/user.slice/restrict/devices.list c 1:9 r c 5:2 rw c 136:* rw # systemd-nspawn --register=false -D . v2: - remove "bind", it is not needed since there is already MS_BIND v3: - fix error management when calling touch() - fix lowercase in error message
Diffstat (limited to 'src/binfmt')
0 files changed, 0 insertions, 0 deletions