diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-03-14 20:07:50 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-03-14 20:07:50 +0100 |
commit | 67aa455172189d92abbcf3dc90b2848278edcf1b (patch) | |
tree | d19d0bce5ab6ebcbfaedd26f28f179b62e6db1d4 /src/journal/journald.c | |
parent | 4367379907f40cbe7df6a64e51c36f34dd854197 (diff) |
journald: set SO_PASSEC only if selinux is enabled
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r-- | src/journal/journald.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c index aea7816679..50f66be9d9 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -2308,10 +2308,12 @@ static int open_syslog_socket(Server *s) { return -errno; } +#ifdef HAVE_SE one = 1; r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one)); if (r < 0) log_warning("SO_PASSSEC failed: %m"); +#endif one = 1; r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one)); @@ -2369,10 +2371,12 @@ static int open_native_socket(Server*s) { return -errno; } +#ifdef HAVE_SELINUX one = 1; r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one)); if (r < 0) log_warning("SO_PASSSEC failed: %m"); +#endif one = 1; r = setsockopt(s->native_fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one)); |