diff options
author | joe <joe@FreeBSD.org> | 2001-10-23 07:13:09 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-10-23 07:13:09 +0800 |
commit | cc6e0e6a3aa5b63861d3ca2de73d68c3a7474023 (patch) | |
tree | 9adc3ac3f9760fe3e42be4e3cbd783220434bb14 /CVSROOT/log_accum.pl | |
parent | 4ac6052ef71daa31693c6306a7ce898e7fdb830e (diff) | |
download | freebsd-ports-gnome-cc6e0e6a3aa5b63861d3ca2de73d68c3a7474023.tar.gz freebsd-ports-gnome-cc6e0e6a3aa5b63861d3ca2de73d68c3a7474023.tar.zst freebsd-ports-gnome-cc6e0e6a3aa5b63861d3ca2de73d68c3a7474023.zip |
Back out the last commit. Looking through the cvs source code it's
not safe to rely on CVS_USER just yet. It doesn't get cleared in
normal mode, so it would be possible for a local user to pretend
that someone else made a commit in the email (even though the
repository itself was correct.)
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 669fd1acabf8..c41b66362fcd 100755 --- a/CVSROOT/log_accum.pl +++ b/CVSROOT/log_accum.pl @@ -52,8 +52,6 @@ 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"; ############################################################ # @@ -356,7 +354,9 @@ sub build_header { my $datestr = `/bin/date +"%Y/%m/%d %H:%M:%S %Z"`; chomp $datestr; - my $header = sprintf("%-8s %s", $CVSUSER, $datestr); + my $login = $ENV{'USER'} || getlogin || + (getpwuid($<))[0] || sprintf("uid#%d",$<); + my $header = sprintf("%-8s %s", $login, $datestr); my @text; push @text, $header; |