X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournald-server.c;h=332ba41363e842293bf99b590f31daa87ca78cb2;hb=3a83211689bdf4ab617a4fb79e11980c50918123;hp=44ba916f1045d56f262f9d9385afc206a2c03ae1;hpb=670b110c3b59dfa335ac43065b2038400d1d04a9;p=elogind.git diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 44ba916f1..332ba4136 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -578,6 +578,13 @@ static void dispatch_message_real( IOVEC_SET_STRING(iovec[n++], x); } + r = get_process_capeff(ucred->pid, &t); + if (r >= 0) { + x = strappenda("_CAP_EFFECTIVE=", t); + free(t); + IOVEC_SET_STRING(iovec[n++], x); + } + #ifdef HAVE_AUDIT r = audit_session_from_pid(ucred->pid, &audit); if (r >= 0) { @@ -910,11 +917,12 @@ static int system_journal_open(Server *s) { if (r >= 0) server_fix_perms(s, s->system_journal, 0); - } else if (r < 0) { - if (r != -ENOENT && r != -EROFS) - log_warning("Failed to open system journal: %s", strerror(-r)); + else if (r < 0) { + if (r != -ENOENT && r != -EROFS) + log_warning("Failed to open system journal: %s", strerror(-r)); - r = 0; + r = 0; + } } if (!s->runtime_journal &&