X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fjournal%2Fjournald-server.c;h=81de9596664bca69d627067ed95862ae3067720f;hp=44ba916f1045d56f262f9d9385afc206a2c03ae1;hb=2f5df74a5ec135ab2baebf26af6f088e5b4b8205;hpb=670b110c3b59dfa335ac43065b2038400d1d04a9 diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 44ba916f1..81de95966 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) { @@ -838,6 +845,11 @@ void server_dispatch_message( if (LOG_PRI(priority) > s->max_level_store) return; + /* Stop early in case the information will not be stored + * in a journal. */ + if (s->storage == STORAGE_NONE) + return; + if (!ucred) goto finish; @@ -910,11 +922,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 &&