}
#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) {
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();