#!/usr/bin/perl -w # # $FreeBSD$ # # Access control lists for CVS. dgg@ksr.com (David G. Grubbs) # # ==== FORMAT OF THE avail FILE: # # The avail file determines whether you may commit files. It contains lines # read from top to bottom, keeping track of a single "bit". The "bit" # defaults to "on". It can be turned "off" by "unavail" lines and "on" by # "avail" lines. ==> Last one counts. # # Any line not beginning with "avail" or "unavail" is ignored. # # Lines beginning with "avail" or "unavail" are assumed to be '|'-separated # triples: (All spaces and tabs are ignored in a line.) # # {avail.*,unavail.*} [| user,user,... [| repos,repos,...]] # # 1. String starting with "avail" or "unavail". # 2. Optional, comma-separated list of usernames. # 3. Optional, comma-separated list of repository pathnames. # These are pathnames relative to $CVSROOT. They can be directories or # filenames. A directory name allows access to all files and # directories below it. # # Example: (Text from the ';;' rightward may not appear in the file.) # # unavail ;; Make whole repository unavailable. # avail|dgg ;; Except for user "dgg". # avail|fred, john|bin/ls ;; Except when "fred" or "john" commit to # ;; the module whose repository is "bin/ls" # # PROGRAM LOGIC: # # CVS passes to @ARGV an absolute directory pathname (the repository # appended to your $CVSROOT variable), followed by a list of filenames # within that directory. # # We walk through the avail file looking for a line that matches both # the username and repository. # # A username match is simply the user's name appearing in the second # column of the avail line in a space-or-comma separate list. # # A repository match is either: # - One element of the third column matches $ARGV[0], or some # parent directory of $ARGV[0]. # - Otherwise *all* file arguments ($ARGV[1..$#ARGV]) must be # in the file list in one avail line. # - In other words, using directory names in the third column of # the avail file allows committing of any file (or group of # files in a single commit) in the tree below that directory. # - If individual file names are used in the third column of # the avail file, then files must be committed individually or # all files specified in a single commit must all appear in # third column of a single avail line. # # Additional (2001/11/16): I've added a group function for labelling # groups of users. To define a group add a line in the avail file of # the form: # group|grpname1|joe,fred,bob # group|grpname2|pete,:grpname1,simon # group|grpname2|sid,:grpname2,mike # group|anothergroup|!filename/containing/listofusers # # The group name can be used in any place a user name could be used in # an avail or unavail line. Just precede the group name with a ':' # character. In the example above you'll note that you can define a # group more than once. Each definition overrides the previous one, # but can include itself to add to it. # # In place of a username in any of the above rules, you can specify # a group name preceeded with a ':' character, or a filename preceeded # with a '!' character. In the case of a file it is assumed relative to # $CVSROOT/CVSROOT/ unless it started witha leading '/'. All blank lines # and comments are ignored, and the remaining lines are treated as one # username per line. use strict; use lib $ENV{CVSROOT}; use CVSROOT::cfg; my $CVSROOT = $ENV{'CVSROOT'} || die "Can't determine \$CVSROOT!"; my $debug = $cfg::DEBUG; my %GROUPS; # List of committer groups my $exit_val = 0; # Good Exit value my $universal_off = 0; my $BASE_FN = "$cfg::TMPDIR/$cfg::FILE_PREFIX"; my $FILES_FILE = "$BASE_FN.files"; ####################################### # process any variable=value switches ####################################### my $die = ''; eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';" while ($ARGV[0] =~ /^(\w+)=/ && shift(@ARGV)); exit 255 if $die; ####################################### # Work out where in the repo we're at. ####################################### my $repos = shift; $repos =~ s:^$CVSROOT/::; grep($_ = $repos . '/' . $_, @ARGV); print "$$ Repos: $repos\n","$$ ==== ",join("\n$$ ==== ",@ARGV),"\n" if $debug; ####################################### # Find Tag/Branch. ####################################### my $tag = "HEAD"; if (-r "CVS/Tag") { open(TAG, "); close(TAG); if ($tmp =~ m/^T(.*)/) { $tag = $1; } } print "$$ Tag: $tag\n" if $debug; print "$$ Avail: $cfg::AVAIL_FILE\n" if $debug; if (open(FILES, ">$FILES_FILE")) { foreach (@ARGV) { print FILES "$tag\t$_\n"; } close(FILES); } else { print "$$ Cannot open $FILES_FILE ($!)\n"; } ####################################### # Check that the user has permission. ####################################### # It is ok for the avail file not to exist. exit 0 unless -e $cfg::AVAIL_FILE; # Suck in a list of committer groups from the avail file. open (AVAIL, $cfg::AVAIL_FILE) || die "open $cfg::AVAIL_FILE: $!\n"; while () { next unless /^group\|/; chomp; my ($keywrd, $gname, $members) = split /\|/, $_; $GROUPS{$gname} = expand_users($members); } close(AVAIL); open (AVAIL, $cfg::AVAIL_FILE) || die "open $cfg::AVAIL_FILE: $!\n"; while () { chomp; next if /^\s*\#/; next if /^\s*$/; next if /^group\|/; print "--------------------\n" if $debug; my $rule = $_; my ($flagstr, $u, $m) = split(/[\s,]*\|[\s,]*/, $rule); # Skip anything not starting with "avail" or "unavail" and complain. if ($flagstr !~ /^avail/ && $flagstr !~ /^unavail/) { print "Bad avail line: $rule\n"; next; } # Set which bit we are playing with. ('0' is OK == Available). my $flag = (($& eq "avail") ? 0 : 1); # If we find a "universal off" flag (i.e. a simple "unavail") # remember it my $universal_off = 1 if ($flag && !$u && !$m); # Expand any group names into a full user list. my $users = expand_users($u); # $cfg::COMMITTER considered "in user list" if actually in list # or is NULL my $in_user = (!$u || grep ($_ eq $cfg::COMMITTER, split(/[\s,]+/, $users))); print "$$ \$cfg::COMMITTER ($cfg::COMMITTER) in user list: $rule\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. my $in_repo = (!$m || 0); unless ($in_repo) { my @tmp = split(/[\s,]+/, $m); for my $j (@tmp) { # If the repos from avail is a parent(or equal) # dir of $repos, OK if ($repos eq $j || $repos =~ /^$j\//) { $in_repo = 1; last; } } unless ($in_repo) { #$in_repo = 1; for my $j (@ARGV) { last unless $in_repo = grep ($_ eq $j, @tmp); } } } print "$$ \$repos($repos) in repository list: $rule\n" if $debug && $in_repo; print "$$ Expanded user list: $users\n" if $debug; $exit_val = $flag if ($in_user && $in_repo); print "$$ ==== \$exit_val = $exit_val\n$$ ==== \$flag = $flag\n" if $debug; } close(AVAIL); print "$$ ==== \$exit_val = $exit_val\n" if $debug; 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; exit($exit_val); # Expand a user specification containing group names and deltas into # a definitive list of users. sub expand_users { my $user_list = shift || ""; # Parse the members. my @members = split /,/, $user_list; my %members; foreach my $m (@members) { if ($m =~ s/^://) { if (!defined($GROUPS{$m})) { warn "Group '$m' not defined before use in " . "$cfg::AVAIL_FILE.\n"; next; } # Add the specified group to the membership. foreach (split /,/, $GROUPS{$m}) { $members{$_} = 1; } } elsif ($m =~ s/\!//) { $m = "$CVSROOT/CVSROOT/$m" if $m !~ /^\//; if (open USERLIST, $m) { while () { chomp; s/\s*(#.*)?$//; next if /^$/; $members{$_} = 1; } close USERLIST; } else { warn "Can't open user file $m " . "defined in $cfg::AVAIL_FILE.\n"; } } else { $members{$m} = 1; } } return join("," , sort keys %members); } sd-ports-gnome/commit/benchmarks?h=gstreamer0.10-removal&id=a20fec130bb22b9ba09f863c6ec324c6b4474387'>Modify rawio(1) to work with GEOM by losing the multiple-open(2)green2005-10-272-5/+231 * Use scripts/version to get the lmbench version instead of usingfenner2005-10-272-10/+6 * Update to lmbench 3alpha4.fenner2005-10-267-440/+128 * Upgrade to version 3.248jmz2005-10-242-5/+5 * - Add ${MASTER_SITE_LOCAL} to the list of master sites.jkoshy2005-10-222-9/+11 * Change IGNORE to BROKEN again. In fact it's can be fixed sometime.mnag2005-10-221-2/+2 * In really mark as IGNORE.mnag2005-10-221-2/+2 * Mark amd64 as BROKENmnag2005-10-222-1/+5 * The program thrulay is used to measure the capacity, delay, andsem2005-10-217-0/+72 * - Update to 2.64clement2005-10-202-4/+4 * - Update to 3.03garga2005-10-196-85/+30 * - Update to 2.63clement2005-10-173-18/+3 * Turn off -DHISTOGRAM as it introduces considerable overhead. Bump portrevision.jkoshy2005-10-142-1/+2 * Update benchmarks/pathchirp to version 2.4.1ehaupt2005-10-052-5/+15 * Respect CC, CXX, CFLAGS and CXXFLAGS.sobomax2005-10-012-0/+52 * Update my emailmnag2005-09-171-1/+1 * - Update to 1.1rc2pav2005-09-154-16/+25 * Add two patches to make longjmp tests runable.vsevolod2005-08-312-0/+22 * Add libmicro - a set of portable benchmarks of system calls fromvsevolod2005-08-2821-0/+600 * Submitter takes maintainership.lawrance2005-07-312-2/+2 * Add flops, floating point benchmark to give your MFLOPS rating.danfe2005-07-064-0/+54 * - Update to 1.2.3pav2005-06-222-5/+5 * - Update to 2.4.0pav2005-06-072-5/+5 * Cleanup ENV-handlingvs2005-06-042-14/+2 * use PLIST_FILESvs2005-06-042-2/+1 * Use MAKE_* instead of Makefile-patchvs2005-06-042-15/+2 * Use PLIST_FILESvs2005-06-042-2/+1 * - Use MAKE_ARGSvs2005-06-044-28/+8 * - Update WWW and set contact to original authorpav2005-05-271-3/+3 * - Change WWW and set contact to original authorpav2005-05-271-3/+3 * fix buildoliver2005-05-261-1/+2 * Add nqueens 1.0, n-queens problem benchmark.danfe2005-05-254-0/+66 * Add pathrate.jylefort2005-05-244-0/+43 * Add pathload.jylefort2005-05-244-0/+39 * Add pathchirp.jylefort2005-05-244-0/+41 * - Move iperf from net to benchmarkspav2005-05-222-1/+2 * Update to 1.4.novel2005-05-163-12/+15 * - Update to 2.0.2novel2005-05-103-5/+18 * At Kris's request, back out the MACHINE_ARCH spelling correction untilobrien2005-04-122-2/+2 * Assist getting more ports working on AMD64 by obeying theobrien2005-04-112-2/+2 * Add mirrorvs2005-04-071-1/+3 * Fix two blunders introduced in previous commit.vs2005-03-211-2/+2 * Cleanup:vs2005-03-213-38/+3 * - Update to 2.0.1.flz2005-03-114-29/+43 * - Update to 2.2.2pav2005-03-102-3/+3 * Use @freebsd.org address for my ports.novel2005-03-081-1/+1 * Fix MASTER_SITES.krion2005-02-182-67/+69 * Unbreak on alpha.krion2005-02-182-1/+12 * - Fix unfetchable distribution problemvs2005-02-174-49/+18 * Blogbench is a portable filesystem benchmark that tries to reproduce thepav2005-02-154-0/+40 * follow the bouncing distfilebillf2005-02-151-1/+1 * Update to match reality.obrien2005-02-131-1/+1 * - Mark BROKEN on ia64sem2005-02-011-2/+2 * Mark BROKEN on alphakevlo2005-01-261-2/+7 * - Update to 1.0sem2005-01-213-64/+5 * Update port: benchmarks/pear-Benchmark to 1.2.2edwin2005-01-202-5/+6 * - polygraph has a restrictive licence.clement2005-01-192-0/+2 * - Remove dead WWWclement2005-01-191-2/+0 * Correct previous fix, path was wrong.se2005-01-191-1/+1 * - Be nicer with CFLAGSclement2005-01-172-6/+15 * Fix install target on architectures other than i386.se2005-01-122-1/+3 * Add netio, a simple network benchmarkarved2005-01-104-0/+42 * Remove bytebench port, which has been repo-copied to unixbencherwin2005-01-091-1/+1 * Remove bytebench port, which has been repo-copied to unixbenchse2005-01-0910-394/+0 * Update bytebench-3.1 to unixbench-4.1.0, based on patches submittedse2005-01-0917-367/+229 * Initial cut at making this buildable on 4.x.obrien2004-12-291-0/+7 * Raidtest requires functions (byteorder(9)) which were introduced inpjd2004-12-291-1/+7 * Fix compilation on sparc64.pjd2004-12-091-2/+2 * With portmgr hat on, reset maintainership of committer who has notlinimon2004-12-052-2/+2 * Shorten comment.obrien2004-12-051-1/+1 * Add a "README".obrien2004-12-051-1/+18 * pjd's src/tools/tools/raidtest as a port.obrien2004-12-055-0/+481 * - Update to 2.61clement2004-12-012-4/+3 * Update to 2.8.1, remove needless patches.osa2004-11-3010-62/+34 * Upgrade to 2.3pl1.sumikawa2004-11-198-72/+109 * - Add ftp as secondary categorypav2004-11-071-1/+1 * Add dkftpbench 0.45,krion2004-10-275-0/+194 * - Update to 2.2.1vs2004-10-265-26/+20 * Add pear-Benchmark 1.2.1, framework to benchmark PHP scripts orthierry2004-10-184-0/+32 * Back out the use of PORTSDIR before the inclusion of bsd.ports.pre.mkerwin2004-10-121-1/+1 * Drop maintainership to ports@FreeBSD.orgkrion2004-10-122-2/+2 * - Reset maintainership to ports@sergei2004-10-121-2/+2 * - add NOPRECIOUSMAKEVARS=yes and unbreak this port on 5.xleeym2004-09-221-8/+2 * BROKEN on 5.x: Broken by make(1) changeskris2004-09-191-1/+7 * - use getnodeipbyname() instead of unsafe gethostbyname() to preventclement2004-09-142-0/+13 * - Update to 2.1.2clement2004-08-242-5/+6 * - Define JAVA_VERSION;thierry2004-08-212-11/+17 * OPTIMIZED_FLAGS should be WITH_OPTMIZED_FLAGSmaho2004-08-181-2/+2 * Fix many thingsmaho2004-08-182-39/+24 * Fix typomaho2004-08-161-2/+2 * Marked as RESTRICTED.maho2004-08-161-2/+1 * User settable USE_* -> WITH_*maho2004-08-161-12/+12 * WITH_IFC, WITH_ICC -> USE_IFC, USE_ICCmaho2004-08-162-25/+25 * Add Himeno Benchmark. this suite was made by HIMENO, Ryutaro,maho2004-08-1610-0/+220 * maho@ reported that atlas isn't broken any longer on amd64oliver2004-07-141-5/+0 * Add CONFLICTS - both pkg-plist files containes bin/ltrace.osa2004-07-142-0/+4 * Update to 1.5krion2004-07-022-3/+3 * Sipp is a performance test tool / traffic generator for the SIP protocol.lth2004-06-186-0/+557 * - Fix dependency on httperf forgotten in previous repocopyclement2004-06-101-1/+1 * - Move httperf from www to benchmarks categoryclement2004-06-102-1/+2 * - Chase checksum. Diff can be found in PRpav2004-06-102-4/+5 * - Fix MASTER_SITESclement2004-05-221-2/+1 * Since the recent updates, Jikes does not compile this programthierry2004-04-121-0/+1 * Remove category pkg/COMMENT files in favour of a COMMENT variable in thekris2004-04-022-1/+2 * SIZEify (maintainer timeout)trevor2004-03-315-0/+8 * Upgrade to 2.2pl4.sumikawa2004-03-302-4/+4 * Makefile.pnet:pav2004-03-271-3/+0 * Add pnetmark, a benchmark program for Common Language Runtime (C#)pav2004-03-264-0/+55 * Add SIZE data to distinfo files.se2004-03-233-0/+3 * Add SIZE information.jkoshy2004-03-221-0/+1 * The gshar+gunshar port is renamed to ports/archivers/sharutils.trevor2004-03-201-1/+1 * SIZE-ify my ports.thierry2004-03-192-0/+2 * Add SIZE.sumikawa2004-03-181-0/+1 * - SIZEify.mich2004-03-181-0/+1 * Add size data.trevor2004-03-182-0/+2 * SIZEify my ports.leeym2004-03-181-0/+1 * Add SIZE information.jkoshy2004-03-181-0/+1 * SIZEify.trevor2004-03-181-0/+1 * - Mark BROKEN: Checksum mismatchkrion2004-03-031-0/+2 * unbreak ; it did build on my -current (Feb/09/2004)ijliao2004-03-022-9/+3 * Fix BROKEN by update to latest 2.8.0 version.osa2004-02-2710-98/+128 * - Update to version 1.3krion2004-02-263-14/+3 * High Performance Computing Linpack Benchmarkoliver2004-02-265-0/+153 * Mark as broken on 4.x as well as 5.x. No response from maintainerlinimon2004-02-122-4/+0 * add sizeleeym2004-02-111-0/+1 * - SIZEify distinfoclement2004-02-081-0/+1 * Use PLIST_FILES (bento-tested, marcus-reviewed).trevor2004-02-0620-11/+13 * Use PLIST_FILES.trevor2004-02-062-1/+1 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-042-0/+2 * - Fix build on -STABLEpav2004-01-313-0/+17 * - Update to 1.2pav2004-01-314-16/+3 * SIZEify.trevor2004-01-301-0/+1 * Fix build on -stable.ale2004-01-292-0/+15 * - Update to 2.59clement2004-01-293-14/+4 * Add SIZE.trevor2004-01-288-0/+8 * - Allow blasting 10000 blockspav2004-01-263-2/+4 * - Obey NO_INSTALL_MANPAGESpav2004-01-243-4/+19 * Add forkbomb 1.0, system stress testing tool.ale2004-01-236-0/+45 * - Update to version 1.4krion2004-01-224-30/+13 * - move the three individual distfiles into ${DISTFILES}/ttcp tomharo2004-01-172-7/+8 * [REPOCOPY WAITING] ports/net/nttcp and ports/net/ttcp appear miscategorizededwin2004-01-16