summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2015-03-06 12:15:23 +0100
committerKarel Zak2015-03-06 12:15:23 +0100
commit17d66ccc7516a5e2cf681abc73406559da41eaae (patch)
tree722c6084a9dfd51ccab0a60e349f134bb8e0ed9b
parentlogger: remove "interface to syslog(3)" from man page (diff)
downloadkernel-qcow2-util-linux-17d66ccc7516a5e2cf681abc73406559da41eaae.tar.gz
kernel-qcow2-util-linux-17d66ccc7516a5e2cf681abc73406559da41eaae.tar.xz
kernel-qcow2-util-linux-17d66ccc7516a5e2cf681abc73406559da41eaae.zip
logger: use username as the default tag
Reported-by: Rainer Gerhards <rgerhards@adiscon.com> Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--misc-utils/logger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/logger.c b/misc-utils/logger.c
index 81581300e..308db8b34 100644
--- a/misc-utils/logger.c
+++ b/misc-utils/logger.c
@@ -474,7 +474,7 @@ static void syslog_local(const struct logger_ctl *ctl, const char *msg)
char pid[32];
int len;
- tag = ctl->tag ? ctl->tag : program_invocation_short_name;
+ tag = ctl->tag ? ctl->tag : xgetlogin();
if (ctl->pid)
snprintf(pid, sizeof(pid), "[%d]", ctl->pid);