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

rpms/shadow-utils/devel shadow-4.0.17-UID_GID.patch, 1.1, 1.2 shadow-utils.spec, 1.82, 1.83



Author: pvrabec

Update of /cvs/dist/rpms/shadow-utils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv24192

Modified Files:
	shadow-4.0.17-UID_GID.patch shadow-utils.spec 
Log Message:
fix bug introduced with UIG_GID.patch (#201991)


shadow-4.0.17-UID_GID.patch:
 groupadd.c |   29 ++++++++++++++++++----------
 groupmod.c |   35 ++++++++++++++++++++++------------
 useradd.c  |   57 ++++++++++++++++++++++++++++++++------------------------
 usermod.c  |   62 ++++++++++++++++++++++++++++++++++---------------------------
 4 files changed, 110 insertions(+), 73 deletions(-)

Index: shadow-4.0.17-UID_GID.patch
===================================================================
RCS file: /cvs/dist/rpms/shadow-utils/devel/shadow-4.0.17-UID_GID.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- shadow-4.0.17-UID_GID.patch	4 Aug 2006 13:57:58 -0000	1.1
+++ shadow-4.0.17-UID_GID.patch	11 Aug 2006 09:50:58 -0000	1.2
@@ -1,5 +1,5 @@
---- shadow-4.0.17/src/groupadd.c.UID_GID	2006-07-27 13:35:46.000000000 +0200
-+++ shadow-4.0.17/src/groupadd.c	2006-07-27 13:40:19.000000000 +0200
+--- shadow-4.0.17/src/groupadd.c.UID_GID	2006-08-11 11:24:21.000000000 +0200
++++ shadow-4.0.17/src/groupadd.c	2006-08-11 11:24:21.000000000 +0200
 @@ -89,6 +89,7 @@
  static void close_files (void);
  static void open_files (void);
@@ -50,8 +50,8 @@
  				break;
  			case 'h':
  				usage ();
---- shadow-4.0.17/src/groupmod.c.UID_GID	2006-07-27 13:35:46.000000000 +0200
-+++ shadow-4.0.17/src/groupmod.c	2006-07-27 13:46:50.000000000 +0200
+--- shadow-4.0.17/src/groupmod.c.UID_GID	2006-08-11 11:24:21.000000000 +0200
++++ shadow-4.0.17/src/groupmod.c	2006-08-11 11:24:21.000000000 +0200
 @@ -89,6 +89,7 @@
  static void process_flags (int, char **);
  static void close_files (void);
@@ -115,9 +115,9 @@
  			break;
  		case 'n':
  			nflg++;
---- shadow-4.0.17/src/useradd.c.UID_GID	2006-07-27 13:35:46.000000000 +0200
-+++ shadow-4.0.17/src/useradd.c	2006-07-27 13:40:19.000000000 +0200
-@@ -201,42 +201,47 @@
+--- shadow-4.0.17/src/useradd.c.UID_GID	2006-08-11 11:24:21.000000000 +0200
++++ shadow-4.0.17/src/useradd.c	2006-08-11 11:27:25.000000000 +0200
+@@ -201,42 +201,51 @@
  	exit (code);
  }
  
@@ -126,12 +126,15 @@
  {
 -	gid_t gid;
 -	char *ep;
--
++	long gid;
++	char *errptr;
+ 
 -	gid = strtoul (name, &ep, 10);
 -	if (*name != '\0' && *ep == '\0')	/* valid numeric GID */
 -		return getgrgid (gid);
-+	long gid;
-+	char *errptr;
++	struct group* grp = getgrnam(grname);
++	if (grp)
++		return grp;
  
 -	return getgrnam (name);
 +	gid = strtol (grname, &errptr, 10);
@@ -140,7 +143,7 @@
 +			 _("%s: invalid numeric argument '%s'\n"), Prog, grname);
 +		exit (E_BAD_ARG);
 +	}
-+	return getgrnam (grname);
++	return getgrgid (gid);
  }
  
 -static long get_number (const char *cp)
@@ -148,12 +151,12 @@
  {
  	long val;
 -	char *ep;
--
++	char *errptr;
+ 
 -	val = strtol (cp, &ep, 10);
 -	if (*cp != '\0' && *ep == '\0')	/* valid number */
 -		return val;
-+	char *errptr;
- 
+-
 -	fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog, cp);
 -	exit (E_BAD_ARG);
 +	val = strtol (numstr, &errptr, 10);
@@ -190,8 +193,8 @@
  }
  
  #define MATCH(x,y) (strncmp((x),(y),strlen(y)) == 0)
---- shadow-4.0.17/src/usermod.c.UID_GID	2006-07-27 13:35:46.000000000 +0200
-+++ shadow-4.0.17/src/usermod.c	2006-07-27 13:40:19.000000000 +0200
+--- shadow-4.0.17/src/usermod.c.UID_GID	2006-08-11 11:24:21.000000000 +0200
++++ shadow-4.0.17/src/usermod.c	2006-08-11 11:29:03.000000000 +0200
 @@ -68,12 +68,12 @@
  #define E_USAGE		2	/* invalid command syntax */
  #define E_BAD_ARG	3	/* invalid argument to option */
@@ -207,7 +210,7 @@
  #define E_HOMEDIR	12	/* unable to complete home dir move */
  #define	VALID(s)	(strcspn (s, ":\n") == strlen (s))
  /*
-@@ -160,16 +160,18 @@
+@@ -160,16 +160,22 @@
   * "56k-family"... ergh.
   * --Pac.
   */
@@ -224,17 +227,21 @@
 +	char *errptr;
  
 -	return getgrnam (name);
++	struct group* grp = getgrnam(grname);
++	if (grp)
++		return grp;
++
 +	val = strtol (grname, &errptr, 10);
 +	if (*errptr || errno == ERANGE || val < 0) {
 +		fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog,
 +			 grname);
 +		exit (E_BAD_ARG);
 +	}
-+	return getgrnam (grname);
++	return getgrgid (val);
  }
  
  /*
-@@ -803,30 +805,32 @@
+@@ -803,30 +809,32 @@
  	return ret;
  }
  


Index: shadow-utils.spec
===================================================================
RCS file: /cvs/dist/rpms/shadow-utils/devel/shadow-utils.spec,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- shadow-utils.spec	5 Aug 2006 15:28:45 -0000	1.82
+++ shadow-utils.spec	11 Aug 2006 09:50:58 -0000	1.83
@@ -5,7 +5,7 @@
 Summary: Utilities for managing accounts and shadow password files.
 Name: shadow-utils
 Version: 4.0.17
-Release: 4
+Release: 5
 Epoch: 2
 URL: http://shadow.pld.org.pl/
 Source0: ftp://ftp.pld.org.pl/software/shadow/shadow-%{version}.tar.bz2
@@ -210,13 +210,16 @@
 %{_mandir}/*/man8/faillog.8*
 
 %changelog
-* Sat Aug 09 2006 Peter Vrabec <pvrabec redhat com> 2:4.0.17-4
+* Fri Aug 11 2006 Peter Vrabec <pvrabec redhat com> 2:4.0.17-5
+- fix bug introduced with UIG_GID.patch (#201991)
+
+* Sat Aug 05 2006 Peter Vrabec <pvrabec redhat com> 2:4.0.17-4
 - fix userdel, it didn't delete user's group (#201379)
 
-* Fri Aug 08 2006 Peter Vrabec <pvrabec redhat com> 2:4.0.17-3
+* Fri Aug 04 2006 Peter Vrabec <pvrabec redhat com> 2:4.0.17-3
 - fix UID/GID overflow in user* group* (#198920)
 
-* Fri Aug 08 2006 Peter Vrabec <pvrabec redhat com> 2:4.0.17-2
+* Fri Aug 04 2006 Peter Vrabec <pvrabec redhat com> 2:4.0.17-2
 - do not inherit file desc. in execve(nscd)
 
 * Mon Jul 17 2006 Peter Vrabec <pvrabec redhat com> 2:4.0.17-1


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