shadow: another fix to useradd (submitting to upstream as well)

This commit is contained in:
Johannes Winkelmann 2006-04-12 09:12:13 +00:00
parent cd92de8a34
commit 0067249ccc
4 changed files with 18 additions and 5 deletions

View File

@ -3,4 +3,5 @@ be8f69c2701118093af3d7f3bc02af16 pwck
9e2f566e29068dc98e42ea94ac788200 shadow-4.0.15-nflg-conflict.diff
01bab2b152b8f2ae0056a467fa365797 shadow-4.0.15-noshadowgrp.diff
a0452fa989f8ba45023cc5a08136568e shadow-4.0.15.tar.bz2
ca5630fc50fdf84daecde18149f321ec shadow-fix-useradd-usergroups.patch
a588e277ff49988f0e3787c5b327d10c shadow-fix-useradd-usergroups.patch
75161be083592e2e4e7f9cdcb7369bab useradd-usergroup.diff

View File

@ -5,18 +5,20 @@
name=shadow
version=4.0.15
release=3
release=4
source=(ftp://ftp.pld.org.pl/software/shadow/$name-$version.tar.bz2 \
pwck login.defs \
shadow-4.0.15-noshadowgrp.diff \
shadow-fix-useradd-usergroups.patch\
shadow-4.0.15-nflg-conflict.diff)
shadow-4.0.15-nflg-conflict.diff \
useradd-usergroup.diff)
build() {
cd $name-$version
patch -p1 < $SRC/shadow-4.0.15-noshadowgrp.diff
patch src/useradd.c $SRC/shadow-fix-useradd-usergroups.patch
patch src/useradd.c $SRC/shadow-4.0.15-nflg-conflict.diff
patch src/useradd.c $SRC/useradd-usergroup.diff
./configure --prefix=/usr \
--mandir=/usr/man \

View File

@ -15,14 +15,13 @@
cflg = 0, /* comment (GECOS) field for new account */
dflg = 0, /* home directory for new account */
Dflg = 0, /* set/show new user default values */
@@ -253,6 +253,11 @@ static void get_defaults (void)
@@ -253,6 +253,10 @@ static void get_defaults (void)
const struct group *grp;
/*
+ * Pull relevant settings from login.defs first.
+ */
+ nflg = getdef_bool ("USERGROUPS_ENAB");
+ printf("nflg: %d\n", nflg);
+ /*
* Open the defaults file for reading.
*/

View File

@ -0,0 +1,11 @@
--- useradd.c-r1.92 2006-04-12 10:58:55.000000000 +0200
+++ useradd.c 2006-04-12 11:05:03.000000000 +0200
@@ -1733,7 +1733,7 @@
* to that group, use useradd -g username username.
* --bero
*/
- if (!gflg) {
+ if (nflg) {
if (getgrnam (user_name)) {
fprintf (stderr,
_