summaryrefslogtreecommitdiffstats
path: root/CVSROOT/cvs_acls.pl
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2001-11-15 12:39:43 +0000
committerjoe <joe@FreeBSD.org>2001-11-15 12:39:43 +0000
commit345b5ec7d8cc9a721b989f863d878c19b562dc0c (patch)
tree92784679f122990cb29a83bd32b978873a8da520 /CVSROOT/cvs_acls.pl
parent7152f4460e9b5f4aad481c51f2aca5b5a8a2e7f9 (diff)
downloadFreeBSD-ports-345b5ec7d8cc9a721b989f863d878c19b562dc0c.zip
FreeBSD-ports-345b5ec7d8cc9a721b989f863d878c19b562dc0c.tar.gz
Migrate the code that determines what the name of the committer is
to the configuration file creating a new config variable $COMMITTER.
Diffstat (limited to 'CVSROOT/cvs_acls.pl')
-rwxr-xr-xCVSROOT/cvs_acls.pl14
1 files changed, 8 insertions, 6 deletions
diff --git a/CVSROOT/cvs_acls.pl b/CVSROOT/cvs_acls.pl
index a823985..be63ba9 100755
--- a/CVSROOT/cvs_acls.pl
+++ b/CVSROOT/cvs_acls.pl
@@ -83,7 +83,6 @@ my $CVSROOT = $ENV{'CVSROOT'} || die "Can't determine \$CVSROOT!";
my $debug = $cfg::DEBUG;
my $availfile = "$CVSROOT/CVSROOT/avail";
-my $myname = $ENV{"LOGNAME"} || $ENV{"USER"};
my $die = '';
eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';"
@@ -118,9 +117,11 @@ while (<AVAIL>) {
# remember it
my $universal_off = 1 if ($flag && !$u && !$m);
- # $myname considered "in user list" if actually in list or is NULL
- my $in_user = (!$u || grep ($_ eq $myname, split(/[\s,]+/,$u)));
- print "$$ \$myname($myname) in user list: $_\n" if $debug && $in_user;
+ # $cfg::COMMITTER considered "in user list" if actually in list
+ # or is NULL
+ my $in_user = (!$u || grep ($_ eq $cfg::COMMITTER, split(/[\s,]+/,$u)));
+ print "$$ \$cfg::COMMITTER ($cfg::COMMITTER) in user list: $_\n"
+ if $debug && $in_user;
# Module matches if it is a NULL module list in the avail line.
# If module list is not null, we check every argument combination.
@@ -148,7 +149,8 @@ while (<AVAIL>) {
}
close(AVAIL);
print "$$ ==== \$exit_val = $exit_val\n" if $debug;
-print "**** Access denied: Insufficient Karma ($myname|$repos)\n" if $exit_val;
+print "**** Access denied: Insufficient Karma ($cfg::COMMITTER|$repos)\n"
+ if $exit_val;
print "**** Access allowed: Personal Karma exceeds Environmental Karma.\n"
- if $debug && $universal_off && !$exit_val;
+ if $debug && $universal_off && !$exit_val;
exit($exit_val);
OpenPOWER on IntegriCloud