Dr. Werner Fink 2014-07-23 09:14:26 +00:00 committed by Git OBS Bridge
parent cac73ff3da
commit eb2bb6198b
3 changed files with 27 additions and 5 deletions

View File

@ -1,14 +1,13 @@
Use and set default logging console for both journald and kernel messages
---
src/journal/journald-console.c | 92 +++++++++++++++++++++++++++++++++++++++++
src/journal/journald-console.c | 96 +++++++++++++++++++++++++++++++++++++++++
src/journal/journald-console.h | 4 +
src/journal/journald-server.c | 5 ++
src/journal/journald.conf | 2
4 files changed, 102 insertions(+), 1 deletion(-)
3 files changed, 105 insertions(+)
--- src/journal/journald-console.c
+++ src/journal/journald-console.c 2014-07-22 11:22:49.574235948 +0000
+++ src/journal/journald-console.c 2014-07-23 09:08:29.522235688 +0000
@@ -23,6 +23,14 @@
#include <fcntl.h>
#include <unistd.h>
@ -99,7 +98,18 @@ Use and set default logging console for both journald and kernel messages
void server_forward_console(
Server *s,
int priority,
@@ -101,7 +177,23 @@ void server_forward_console(
@@ -63,6 +139,10 @@ void server_forward_console(
if (LOG_PRI(priority) > s->max_level_console)
return;
+
+ /* Do not write security/authorization (private) messages to console */
+ if (priority & LOG_AUTHPRIV)
+ return;
/* First: timestamp */
if (prefix_timestamp()) {
@@ -101,7 +181,23 @@ void server_forward_console(
fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC);
if (fd < 0) {
log_debug("Failed to open %s for logging: %m", tty);

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jul 23 09:13:43 UTC 2014 - werner@suse.de
- Change patch set-and-use-default-logconsole.patch to avoid to
write security/authorization (private) messages to console
-------------------------------------------------------------------
Tue Jul 22 11:50:44 UTC 2014 - werner@suse.de

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jul 23 09:13:43 UTC 2014 - werner@suse.de
- Change patch set-and-use-default-logconsole.patch to avoid to
write security/authorization (private) messages to console
-------------------------------------------------------------------
Tue Jul 22 11:50:44 UTC 2014 - werner@suse.de