summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-04 16:59:13 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-04 16:59:13 +0200
commit82d252404a7ee6bd5f24482a0b50a8e91aa93257 (patch)
treeaae3fde8affea0b65ab5e69990828b3d0158419b /src/core
parent7e9f159ca78d4cedc8d9c3276e409a4653a6af69 (diff)
core: make sure PrivateDevices= makes /dev/log available
Now that we moved the actual syslog socket to /run/systemd/journal/dev-log we can actually make /dev/log a symlink to it, when PrivateDevices= is used, thus making syslog available to services using PrivateDevices=.
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 de09e9f2c3..16540043ab 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;
+ const char *d, *dev = NULL, *devpts = NULL, *devshm = NULL, *devkdbus = NULL, *devhugepages = NULL, *devmqueue = NULL, *devlog = NULL;
_cleanup_umask_ mode_t u;
int r;
@@ -188,6 +188,9 @@ static int mount_dev(BindMount *m) {
mkdir(devhugepages, 0755);
mount("/dev/hugepages", devhugepages, NULL, MS_BIND, NULL);
+ devlog = strappenda(temporary_mount, "/dev/log");
+ symlink("/run/systemd/journal/dev-log", devlog);
+
NULSTR_FOREACH(d, devnodes) {
_cleanup_free_ char *dn = NULL;
struct stat st;