]> 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>
Fri, 6 Mar 2015 11:15:23 +0000 (12:15 +0100)
Reported-by: Rainer Gerhards <rgerhards@adiscon.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/logger.c

index 81581300e4281a5ec600706841f3d8c638888bb1..308db8b34d7a14d11d50c0e538eedb19c59d61ca 100644 (file)
@@ -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);