]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
logger: use username as the default tag
authorKarel Zak <kzak@redhat.com>
Fri, 6 Mar 2015 11:15:23 +0000 (12:15 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 12 Mar 2015 09:18:29 +0000 (10:18 +0100)
Reported-by: Rainer Gerhards <rgerhards@adiscon.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/logger.c

index e19ef05903ac1c157094e54e7009c591c89caa90..24cbb3b0b461f9162209b2d853a6de5b96f5a50b 100644 (file)
@@ -491,7 +491,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);