Remove duplicate group initialisation function.
authorTim Potter <tpot@samba.org>
Wed, 11 Oct 2000 04:54:01 +0000 (04:54 +0000)
committerTim Potter <tpot@samba.org>
Wed, 11 Oct 2000 04:54:01 +0000 (04:54 +0000)
Don't initialise groups twice.

source/smbd/password.c

index 2f720db9c1a24e86271ee78b4e57e8bfed3aa980..55c7f0709bb2a63fc22f67ab068f7fe646722952 100644 (file)
@@ -159,27 +159,6 @@ char *validated_domain(uint16 vuid)
 }
 
 
-/****************************************************************************
- Initialize the groups a user belongs to.
-****************************************************************************/
-
-BOOL initialize_groups(char *user, uid_t uid, gid_t gid)
-{
-       become_root();
-       if (initgroups(user,gid) == -1) {
-               DEBUG(0,("Unable to initgroups. Error was %s\n", strerror(errno) ));
-               if (getuid() == 0) {
-                       if (gid < 0 || gid > 32767 || uid < 0 || uid > 32767) {
-                               DEBUG(0,("This is probably a problem with the account %s\n", user));
-                       }
-               }
-               unbecome_root();
-               return False;
-       }
-       unbecome_root();
-       return True;
-}
-
 /****************************************************************************
  Create the SID list for this user.
 ****************************************************************************/
@@ -260,7 +239,6 @@ uint16 register_vuid(uid_t uid,gid_t gid, char *unix_name, char *requested_name,
   /* Find all the groups this uid is in and store them. 
      Used by become_user() */
   initialise_groups(unix_name, uid, gid);
-  initialize_groups(unix_name, uid, gid);
   get_current_groups( &vuser->n_groups, &vuser->groups);
 
   /* Create an NT_USER_TOKEN struct for this user. */