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 | |
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.)
-rwxr-xr-x | CVSROOT/cvs_acls.pl | 3 | ||||
-rwxr-xr-x | CVSROOT/log_accum.pl | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/CVSROOT/cvs_acls.pl b/CVSROOT/cvs_acls.pl index 3cf9b7ab0396..27b8e095cadd 100755 --- a/CVSROOT/cvs_acls.pl +++ b/CVSROOT/cvs_acls.pl @@ -83,8 +83,7 @@ use CVSROOT::cfg; my $debug = $cfg::DEBUG; my $cvsroot = $ENV{'CVSROOT'}; my $availfile = $cvsroot . "/CVSROOT/avail"; -my $myname = $ENV{"CVS_USER"} || $ENV{"LOGNAME"} || $ENV{"USER"} || "unknown"; - +my $myname = $ENV{"LOGNAME"} || $ENV{"USER"}; my $die = ''; eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';" 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; |