aboutsummaryrefslogtreecommitdiffstats
path: root/CVSROOT
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2001-10-23 04:37:42 +0800
committerjoe <joe@FreeBSD.org>2001-10-23 04:37:42 +0800
commit14df64af8fbe4fd3ebef15aefb9df52e27022d1b (patch)
tree5015905832811f5c6f572b9a703c89214e49869d /CVSROOT
parente1fc3d679f73653f15b7ccac642711f332f6513e (diff)
downloadfreebsd-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')
-rwxr-xr-xCVSROOT/cvs_acls.pl3
-rwxr-xr-xCVSROOT/log_accum.pl6
2 files changed, 5 insertions, 4 deletions
diff --git a/CVSROOT/cvs_acls.pl b/CVSROOT/cvs_acls.pl
index 27b8e095cadd..3cf9b7ab0396 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=\$';"
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;