Hmmm, didn't really notice until now that the latest shadow version created a new group for each user. Thanks for the patch. However, patch does complain that it's missing a header info line (though it still applies the patch fine), so I just attached a patch with that info added to it.
Submitted By: Marc Trachy <mltrachy at gmail dot com> 
Date: 2006-02-24
Initial Package Version: 4.0.14
Upstream Status: Unknown
Origin: Marc Trachy
Description: Supresses the creation of a new group during the creation of each n
ew user.

diff -Naur shadow-4.0.14.orig/src/useradd.c shadow-4.0.14/src/useradd.c
--- shadow-4.0.14.orig/src/useradd.c    2005-12-15 10:06:28.000000000 -0500
+++ shadow-4.0.14/src/useradd.c 2006-02-25 00:58:32.000000000 -0500
@@ -914,6 +914,7 @@
 
 static void find_new_gid ()
 {
+       fprintf(stderr, "Trying to find new gid\n");
        const struct group *grp;
        gid_t gid_min, gid_max;
 
@@ -1762,7 +1763,7 @@
 
        /* do we have to add a group for that user? This is why we need to
         * open the group files in the open_files() function  --gafton */
-       if (!(nflg || gflg)) {
+       if (!(!nflg || gflg)) {
                find_new_gid ();
                grp_add ();
        }
-- 
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to