From: Karel Zak Date: Fri, 6 Mar 2015 11:15:23 +0000 (+0100) Subject: logger: use username as the default tag X-Git-Tag: v2.27-rc1~393 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17d66ccc7516a5e2cf681abc73406559da41eaae;p=thirdparty%2Futil-linux.git logger: use username as the default tag Reported-by: Rainer Gerhards Signed-off-by: Karel Zak --- diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 81581300e4..308db8b34d 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);