summaryrefslogtreecommitdiffstats
path: root/CVSROOT/cvs_acls.pl
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2001-10-22 20:37:42 +0000
committerjoe <joe@FreeBSD.org>2001-10-22 20:37:42 +0000
commit14df64af8fbe4fd3ebef15aefb9df52e27022d1b (patch)
tree5015905832811f5c6f572b9a703c89214e49869d /CVSROOT/cvs_acls.pl
parente1fc3d679f73653f15b7ccac642711f332f6513e (diff)
downloadFreeBSD-ports-14df64af8fbe4fd3ebef15aefb9df52e27022d1b.zip
FreeBSD-ports-14df64af8fbe4fd3ebef15aefb9df52e27022d1b.tar.gz
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/cvs_acls.pl')
-rwxr-xr-xCVSROOT/cvs_acls.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/CVSROOT/cvs_acls.pl b/CVSROOT/cvs_acls.pl
index 27b8e09..3cf9b7a 100755
--- a/CVSROOT/cvs_acls.pl
+++ b/CVSROOT/cvs_acls.pl
@@ -83,7 +83,8 @@ use CVSROOT::cfg;
my $debug = $cfg::DEBUG;
my $cvsroot = $ENV{'CVSROOT'};
my $availfile = $cvsroot . "/CVSROOT/avail";
-my $myname = $ENV{"LOGNAME"} || $ENV{"USER"};
+my $myname = $ENV{"CVS_USER"} || $ENV{"LOGNAME"} || $ENV{"USER"} || "unknown";
+
my $die = '';
eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';"
OpenPOWER on IntegriCloud