From 6f8729bd0e99c8aa00626eebd54fe2b7abf54606 Mon Sep 17 00:00:00 2001 From: chrisdebian Date: Thu, 20 Aug 2026 18:01:14 +0100 Subject: [PATCH 1/2] vlogger.8: fix incorrect default -t tag documentation The -t tag option's man page entry claimed the default tag is the LOGNAME environment variable. That's incorrect - vlogger.c never calls getenv() anywhere. The actual default when -t isn't given: - if /etc/vlogger is used, the tag arg passed to it defaults to an empty string (tag ? tag : "") - if syslog(3) is used directly, the tag defaults to the result of getlogin(3) (tag ? tag : getlogin()) Neither is LOGNAME. Corrected the description to match. The -p pri option's documented default of user.notice is correct as written (facility = LOG_USER; level = LOG_NOTICE; are the literal initial values in main()), so left that section untouched. --- vlogger.8 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vlogger.8 b/vlogger.8 index 24a45c82..c0f47828 100644 --- a/vlogger.8 +++ b/vlogger.8 @@ -115,9 +115,13 @@ Defines the .Pa ident which is used as prefix for each log message or passed as first argument to .Pa /etc/vlogger . -The default is the -.Ev LOGNAME -environment variable. +If not given, the default is an empty string when +.Pa /etc/vlogger +is used, or the result of +.Xr getlogin 3 +when +.Xr syslog 3 +is used directly. .It Ar message Write the .Ar message From ed9955000f3c67161ad8e643f7e29e6adc4f0911 Mon Sep 17 00:00:00 2001 From: chrisdebian Date: Fri, 21 Aug 2026 10:30:46 +0100 Subject: [PATCH 2/2] vlogger.8: clarify getlogin(3) default is libc-dependent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit classabbyamp pointed out (PR #137) that getlogin(3) returns $LOGNAME on musl but NULL unconditionally on glibc. The previous wording correctly traced the C code (tag ? tag : getlogin()) but didn't tell the reader the practical outcome differs by libc — on glibc, the default is effectively no tag at all, same as the /etc/vlogger case. Verified with groff -mandoc -Tascii -z (clean) and checked the rendered output. --- vlogger.8 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/vlogger.8 b/vlogger.8 index c0f47828..8f0a60ca 100644 --- a/vlogger.8 +++ b/vlogger.8 @@ -117,11 +117,20 @@ which is used as prefix for each log message or passed as first argument to .Pa /etc/vlogger . If not given, the default is an empty string when .Pa /etc/vlogger -is used, or the result of -.Xr getlogin 3 -when +is used. +When .Xr syslog 3 -is used directly. +is used directly, the default is the result of +.Xr getlogin 3 , +which on +.Tn glibc +always returns +.Dv NULL +(no tag) and on +.Tn musl +returns the value of the +.Ev LOGNAME +environment variable. .It Ar message Write the .Ar message