savannah-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-cvs] administration/infra/savane/bin sv_users


From: Elfyn McBratney
Subject: [Savannah-cvs] administration/infra/savane/bin sv_users
Date: Tue, 14 Sep 2004 19:50:47 -0400

CVSROOT:        /cvsroot/administration
Module name:    administration
Branch:         
Changes by:     Elfyn McBratney <address@hidden>        04/09/14 23:45:37

Modified files:
        infra/savane/bin: sv_users 

Log message:
        test conditional.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/administration/administration/infra/savane/bin/sv_users.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: administration/infra/savane/bin/sv_users
diff -u administration/infra/savane/bin/sv_users:1.1 
administration/infra/savane/bin/sv_users:1.2
--- administration/infra/savane/bin/sv_users:1.1        Tue Sep 14 04:38:12 2004
+++ administration/infra/savane/bin/sv_users    Tue Sep 14 23:45:36 2004
@@ -2,7 +2,7 @@
 # This file is part of the Savane project
 # <http://gna.org/projects/savane/>
 #
-# $Id: sv_users,v 1.1 2004/09/14 04:38:12 beu Exp $
+# $Id: sv_users,v 1.2 2004/09/14 23:45:36 beu Exp $
 #
 #  Copyright 2001      (c) Loic Dachary <loic--at--gnu.org> (sv_cvs.pl)
 #            2003-2004 (c) Mathieu Roy <yeupou--at--gnu.org> 
@@ -75,7 +75,7 @@
 my $userx_prefix;
 
 my $min_uid = "5000";
-my $nobody_uid = 
+my $nobody_uid = 0;
 
 my $one_group = 0;
 
@@ -171,7 +171,6 @@
     my ($user, $email, $realname, $authorized_keys, $gpg_keys,
        $status, $unix_status, $use_cvsadmin, $user_id) = split(",", $line);
 
-    #print "DBG - user=$user\n" if $debug;
     print "DBG db: got $user <$email> from database\n" if $debug;
 
     $authorized_keys = '' if $authorized_keys eq '0';
@@ -212,43 +211,47 @@
     chomp($line);
     my ($user, $group) = split(",", $line);
 
-    print "DBG db: $user is member of $group\n" if $debug;
+    if (!exists $db_user{$user}) {
+       warn "Yowza..  user $user doesn't exist in \$db_user";
+    } else {
+       print "DBG db: $user is member of $group\n" if $debug;
 
-    my @groups;
+       my @groups;
 
-    # If the user picked use_cvsadmin, we add him in the anoncvs group
-    # to allow him to edit files in CVSROOT. 
-    # (yes, this group name is no longer pertinent)
-    #print "DBG - user $user (group $group) is mashed" if !exists 
$db_user{$user};
-    my ($u,$e,$r,$a,$g,$s,$un,$use_cvsadmin) = @{$db_user{$user}};
-
-    # address@hidden 2004-01-10:
-    # It is insecure to allow writing in CVSROOT
-    #
-    #if ($use_cvsadmin) {
-    #    push(@groups, "anoncvs");
-    #}
-
-    unless ($group eq 'www' && $subversions) {
-       push(@groups, $group);
-       push(@groups, "web".$group) unless $one_group;
-    } else {
-       # www is a special group normally used to give
-       # a user write access on the whole CVSROOT of 
-       # web area for any project of the group type 'www'
-       # This stuff is gnu.org specific. If it really need to
-       # be configurable (if someone want to use that), we'll
-       # think about make it configurable.
-       # For instance, we can imagine to select a box in the
-       # group type form.
-       
-       # Need to understand if we really want www + gnu types
-       # or only www.
-       @groups = (@groups, "www", @www_groups);
-       print "DBG db: $user is member of www !\n" if $debug;           
-    }
+       # If the user picked use_cvsadmin, we add him in the anoncvs group
+       # to allow him to edit files in CVSROOT. 
+       # (yes, this group name is no longer pertinent)
+       #print "DBG - user $user (group $group) is mashed" if !exists 
$db_user{$user};
+       my ($u,$e,$r,$a,$g,$s,$un,$use_cvsadmin) = @{$db_user{$user}};
+
+       # address@hidden 2004-01-10:
+       # It is insecure to allow writing in CVSROOT
+       #
+       #if ($use_cvsadmin) {
+       #    push(@groups, "anoncvs");
+       #}
+
+       unless ($group eq 'www' && $subversions) {
+           push(@groups, $group);
+           push(@groups, "web".$group) unless $one_group;
+       } else {
+           # www is a special group normally used to give
+           # a user write access on the whole CVSROOT of 
+           # web area for any project of the group type 'www'
+           # This stuff is gnu.org specific. If it really need to
+           # be configurable (if someone want to use that), we'll
+           # think about make it configurable.
+           # For instance, we can imagine to select a box in the
+           # group type form.
+           
+           # Need to understand if we really want www + gnu types
+           # or only www.
+           @groups = (@groups, "www", @www_groups);
+           print "DBG db: $user is member of www !\n" if $debug;               
+       }
 
-    push(@{$db_user_group{$user}}, @groups);
+       push(@{$db_user_group{$user}}, @groups);
+    }
 }
 
 # db_groups:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]