diff options
author | joe <joe@FreeBSD.org> | 2001-10-23 04:37:42 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-10-23 04:37:42 +0800 |
commit | 14df64af8fbe4fd3ebef15aefb9df52e27022d1b (patch) | |
tree | 5015905832811f5c6f572b9a703c89214e49869d /CVSROOT/log_accum.pl | |
parent | e1fc3d679f73653f15b7ccac642711f332f6513e (diff) | |
download | freebsd-ports-gnome-14df64af8fbe4fd3ebef15aefb9df52e27022d1b.tar.gz freebsd-ports-gnome-14df64af8fbe4fd3ebef15aefb9df52e27022d1b.tar.zst freebsd-ports-gnome-14df64af8fbe4fd3ebef15aefb9df52e27022d1b.zip |
Canonicalise the way that we obtain the username of the committer,
both in the access controls and in the log message generation.
Use the CVS_USER environment variable if it's defined to obtain
the true username. This is set by later versions of cvs (it's in
1.11.1p1), and gets around the problem of using pserver username
aliases in CVSROOT/passwd. With this fix the committer's true
username is checked and reported instead of the system one.
Diffstat (limited to 'CVSROOT/log_accum.pl')
-rwxr-xr-x | CVSROOT/log_accum.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CVSROOT/log_accum.pl b/CVSROOT/log_accum.pl index c41b66362fcd..669fd1acabf8 100755 --- a/CVSROOT/log_accum.pl +++ b/CVSROOT/log_accum.pl @@ -52,6 +52,8 @@ my $TAGS_FILE = "$BASE_FN.tags"; my $X_BRANCH_HDR = "X-FreeBSD-CVS-Branch:"; my $CVSROOT = $ENV{'CVSROOT'} || "/home/ncvs"; +my $CVSUSER = $ENV{"CVS_USER"} || $ENV{"LOGNAME"} || + $ENV{"USER"} || "unknown"; ############################################################ # @@ -354,9 +356,7 @@ sub build_header { my $datestr = `/bin/date +"%Y/%m/%d %H:%M:%S %Z"`; chomp $datestr; - my $login = $ENV{'USER'} || getlogin || - (getpwuid($<))[0] || sprintf("uid#%d",$<); - my $header = sprintf("%-8s %s", $login, $datestr); + my $header = sprintf("%-8s %s", $CVSUSER, $datestr); my @text; push @text, $header; |