chiark / gitweb /
logind: optionally handle power, sleep and lid switch events
[elogind.git] / src / journal / journald.c
index 232457aa5b392dfbf77fd711379aef107b953d31..7776c2a25c4e58a624b9a40a849e1fb154d9ebb2 100644 (file)
@@ -1692,8 +1692,8 @@ static int stdout_stream_new(Server *s) {
         }
 
 #ifdef HAVE_SELINUX
-        if (getpeercon(fd, &stream->security_context) < 0)
-                log_error("Failed to determine peer security context.");
+        if (getpeercon(fd, &stream->security_context) < 0 && errno != ENOPROTOOPT)
+                log_error("Failed to determine peer security context: %m");
 #endif
 
         if (shutdown(fd, SHUT_WR) < 0) {
@@ -2774,7 +2774,7 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
         }
 
-        log_set_target(LOG_TARGET_KMSG);
+        log_set_target(LOG_TARGET_SAFE);
         log_set_facility(LOG_SYSLOG);
         log_parse_environment();
         log_open();