chiark / gitweb /
systemctl: try to reload daemon after enable/disable only when not running in a chroot
[elogind.git] / src / journal / journald-native.c
index 12fb980dd6c5312df7c8875332ae3d05f0003c69..069114778b39926159f1e522fb377d4abe27a08d 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "socket-util.h"
 #include "path-util.h"
-#include "journald.h"
+#include "journald-server.h"
 #include "journald-native.h"
 #include "journald-kmsg.h"
 #include "journald-console.h"
@@ -314,7 +314,7 @@ void server_process_native_file(
                         return;
                 }
 
-                if (strchr(e, '/')) {
+                if (!filename_is_safe(e)) {
                         log_error("Received file in subdirectory of allowed directories. Refusing.");
                         return;
                 }
@@ -396,7 +396,7 @@ int server_open_native_socket(Server*s) {
 
 #ifdef HAVE_SELINUX
         one = 1;
-        r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
+        r = setsockopt(s->native_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
         if (r < 0)
                 log_warning("SO_PASSSEC failed: %m");
 #endif