summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-04 17:21:18 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-04 17:21:18 +0200
commite06b6479a5dc471412f3a00f4a3d6bd5edb8904c (patch)
tree7f4011d6272a87a9667983631d94677c277a6f0a /src/core
parent82d252404a7ee6bd5f24482a0b50a8e91aa93257 (diff)
core: provide /dev/ptmx as symlink in PrivateDevices= execution environments
Diffstat (limited to 'src/core')
-rw-r--r--src/core/namespace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/namespace.c b/src/core/namespace.c
index 16540043ab..1f987a4b9d 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -143,7 +143,7 @@ static int mount_dev(BindMount *m) {
"/dev/tty\0";
char temporary_mount[] = "/tmp/namespace-dev-XXXXXX";
- const char *d, *dev = NULL, *devpts = NULL, *devshm = NULL, *devkdbus = NULL, *devhugepages = NULL, *devmqueue = NULL, *devlog = NULL;
+ const char *d, *dev = NULL, *devpts = NULL, *devshm = NULL, *devkdbus = NULL, *devhugepages = NULL, *devmqueue = NULL, *devlog = NULL, *devptmx = NULL;
_cleanup_umask_ mode_t u;
int r;
@@ -168,6 +168,9 @@ static int mount_dev(BindMount *m) {
goto fail;
}
+ devptmx = strappenda(temporary_mount, "/dev/ptmx");
+ symlink("pts/ptmx", devptmx);
+
devshm = strappenda(temporary_mount, "/dev/shm");
mkdir(devshm, 01777);
r = mount("/dev/shm", devshm, NULL, MS_BIND, NULL);