rpms/shadow-utils/devel shadow-4.1.0-goodname.patch, NONE, 1.1 shadow-4.1.0-lOption.patch, NONE, 1.1 shadow-4.1.0-redhat.patch, NONE, 1.1 shadow-4.1.0-selinux.patch, NONE, 1.1 .cvsignore, 1.16, 1.17 shadow-utils.spec, 1.107, 1.108 sources, 1.17, 1.18 shadow-4.0.11.1-vipw.patch, 1.1, NONE shadow-4.0.13-newgrpPwd.patch, 1.1, NONE shadow-4.0.14-goodname.patch, 1.2, NONE shadow-4.0.16-lOption.patch, 1.3, NONE shadow-4.0.17-auditLogging.patch, 1.1, NONE shadow-4.0.17-exitValues.patch, 1.1, NONE shadow-4.0.17-notInheritFd.patch, 1.1, NONE shadow-4.0.17-redhat.patch, 1.3, NONE shadow-4.0.17-useradd.patch, 1.5, NONE shadow-4.0.18.1-appendOption.patch, 1.1, NONE shadow-4.0.18.1-gid.patch, 1.1, NONE shadow-4.0.18.1-groupLoop.patch, 1.1, NONE shadow-4.0.18.1-overflow.patch, 1.1, NONE shadow-4.0.18.1-useradd, 1.1, NONE

Peter Vrabec (pvrabec) fedora-extras-commits at redhat.com
Wed Dec 12 15:08:19 UTC 2007


Author: pvrabec

Update of /cvs/extras/rpms/shadow-utils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11518

Modified Files:
	.cvsignore shadow-utils.spec sources 
Added Files:
	shadow-4.1.0-goodname.patch shadow-4.1.0-lOption.patch 
	shadow-4.1.0-redhat.patch shadow-4.1.0-selinux.patch 
Removed Files:
	shadow-4.0.11.1-vipw.patch shadow-4.0.13-newgrpPwd.patch 
	shadow-4.0.14-goodname.patch shadow-4.0.16-lOption.patch 
	shadow-4.0.17-auditLogging.patch 
	shadow-4.0.17-exitValues.patch 
	shadow-4.0.17-notInheritFd.patch shadow-4.0.17-redhat.patch 
	shadow-4.0.17-useradd.patch shadow-4.0.18.1-appendOption.patch 
	shadow-4.0.18.1-gid.patch shadow-4.0.18.1-groupLoop.patch 
	shadow-4.0.18.1-overflow.patch shadow-4.0.18.1-useradd 
Log Message:
- new upgrade release from new upstream
- provide vipw and vigr


shadow-4.1.0-goodname.patch:

--- NEW FILE shadow-4.1.0-goodname.patch ---
diff -up shadow-4.1.0/libmisc/chkname.c.goodname shadow-4.1.0/libmisc/chkname.c
--- shadow-4.1.0/libmisc/chkname.c.goodname	2007-11-11 00:45:59.000000000 +0100
+++ shadow-4.1.0/libmisc/chkname.c	2007-12-12 13:57:20.000000000 +0100
@@ -18,16 +18,24 @@
 static int good_name (const char *name)
 {
 	/*
-	 * User/group names must match [a-z_][a-z0-9_-]*[$]
-	 */
-	if (!*name || !((*name >= 'a' && *name <= 'z') || *name == '_'))
+         * User/group names must match gnu e-regex:
+         *    [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?
+         *
+         * as a non-POSIX, extension, allow "$" as the last char for
+         * sake of Samba 3.x "add machine script"
+         */
+	if (!*name || !((*name >= 'a' && *name <= 'z')
+             || (*name >= 'A' && *name <= 'Z')
+             || (*name >= '0' && *name <= '9')
+             || *name == '_' || *name == '.'))
 		return 0;
 
 	while (*++name) {
-		if (!((*name >= 'a' && *name <= 'z') ||
-		      (*name >= '0' && *name <= '9') ||
-		      *name == '_' || *name == '-' ||
-		      (*name == '$' && *(name + 1) == '\0')))
+		if (!(  (*name >= 'a' && *name <= 'z')
+		     || (*name >= 'A' && *name <= 'Z')
+                     || (*name >= '0' && *name <= '9')
+                     || *name == '_' || *name == '.' || *name == '-'
+                     || (*name == '$' && *(name + 1) == '\0')))
 			return 0;
 	}
 
@@ -43,10 +51,9 @@ int check_user_name (const char *name)
 #endif
 
 	/*
-	 * User names are limited by whatever utmp can
-	 * handle (usually max 8 characters).
+	 * User names are limited by whatever utmp can handle.
 	 */
-	if (strlen (name) > sizeof (ut.ut_user))
+	if (strlen(name) + 1 > sizeof(ut.ut_user))
 		return 0;
 
 	return good_name (name);
@@ -54,11 +61,13 @@ int check_user_name (const char *name)
 
 int check_group_name (const char *name)
 {
-	/*
-	 * Arbitrary limit for group names - max 16
-	 * characters (same as on HP-UX 10).
-	 */
-	if (strlen (name) > 16)
+#if HAVE_UTMPX_H
+	struct utmpx ut;
+#else
+	struct utmp ut;
+#endif
+
+	if (strlen(name) + 1 > sizeof(ut.ut_user))
 		return 0;
 
 	return good_name (name);
diff -up shadow-4.1.0/man/groupadd.8.goodname shadow-4.1.0/man/groupadd.8
--- shadow-4.1.0/man/groupadd.8.goodname	2007-12-12 13:51:43.000000000 +0100
+++ shadow-4.1.0/man/groupadd.8	2007-12-12 14:00:29.000000000 +0100
@@ -126,9 +126,7 @@ Shadow password suite configuration\.
 .RE
 .SH "CAVEATS"
 .PP
-Groupnames must begin with a lower case letter or an underscore, and only lower case letters, underscores, dashes, and dollar signs may follow\. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]
-.PP
-Groupnames may only be up to 16 characters long\.
+Groupnames may only be up to 32 characters long\.
 .PP
 You may not add a NIS or LDAP group\. This must be performed on the corresponding server\.
 .PP
diff -up shadow-4.1.0/man/useradd.8.goodname shadow-4.1.0/man/useradd.8
--- shadow-4.1.0/man/useradd.8.goodname	2007-12-12 13:51:43.000000000 +0100
+++ shadow-4.1.0/man/useradd.8	2007-12-12 14:01:36.000000000 +0100
@@ -242,8 +242,6 @@ You may not add a user to a NIS or LDAP 
 Similarly, if the username already exists in an external user database such as NIS or LDAP,
 \fBuseradd\fR
 will deny the user account creation request\.
-.PP
-Usernames must begin with a lower case letter or an underscore, and only lower case letters, underscores, dashes, and dollar signs may follow\. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]
 .SH "CONFIGURATION"
 .PP
 The following configuration variables in

shadow-4.1.0-lOption.patch:

--- NEW FILE shadow-4.1.0-lOption.patch ---
diff -up shadow-4.1.0/src/useradd.c.lOption shadow-4.1.0/src/useradd.c
--- shadow-4.1.0/src/useradd.c.lOption	2007-12-12 14:03:22.000000000 +0100
+++ shadow-4.1.0/src/useradd.c	2007-12-12 14:08:43.000000000 +0100
@@ -124,6 +124,7 @@ static int
     Gflg = 0,			/* secondary group set for new account */
     kflg = 0,			/* specify a directory to fill new user directory */
     mflg = 0,			/* create user's home directory if it doesn't exist */
+    lflg = 0,      		/* do not add user to lastlog database file */
     Mflg = 0,                   /* do NOT create user's home directory no matter what */
     nflg = 0,                   /* do NOT create a group having the same name as the user */
     oflg = 0,			/* permit non-unique user ID to be specified with -u */
@@ -634,8 +635,9 @@ static void usage (void)
 			   "  -K, --key KEY=VALUE           overrides /etc/login.defs defaults\n"
 			   "  -m, --create-home             create home directory for the new user\n"
 			   "                                account\n"
-                           "  -M,                       do not create user's home directory(overrides /etc/login.defs)\n"
-                           "  -r,                       create system account\n"
+                           "  -l,                           do not add user to lastlog database file\n"
+                           "  -M,                           do not create user's home directory(overrides /etc/login.defs)\n"
+                           "  -r,                           create system account\n"
 			   "  -o, --non-unique              allow create user with duplicate\n"
 			   "                                (non-unique) UID\n"
 			   "  -p, --password PASSWORD       use encrypted password for the new user\n"
@@ -1032,7 +1034,7 @@ static void process_flags (int argc, cha
 			{NULL, 0, NULL, '\0'}
 		};
 		while ((c =
-			getopt_long (argc, argv, "b:c:d:De:f:g:G:k:K:mMnrop:s:u:",
+			getopt_long (argc, argv, "b:c:d:De:f:g:G:k:K:mlMnrop:s:u:",
 				     long_options, NULL)) != -1) {
 			switch (c) {
 			case 'b':
@@ -1169,6 +1171,9 @@ static void process_flags (int argc, cha
 			case 'm':
 				mflg++;
 				break;
+			case 'l':
+	                        lflg++;
+                        	break;
 			case 'o':
 				oflg++;
 				break;
@@ -1538,7 +1543,7 @@ static void usr_update (void)
 	 * are left unchanged).  --marekm
 	 */
 	/* local, no need for xgetpwuid */
-	if (!getpwuid (user_id)) {
+	if (!getpwuid (user_id) && !lflg) {
 		faillog_reset (user_id);
 		lastlog_reset (user_id);
 	}
diff -up shadow-4.1.0/man/useradd.8.lOption shadow-4.1.0/man/useradd.8
--- shadow-4.1.0/man/useradd.8.lOption	2007-12-12 14:03:22.000000000 +0100
+++ shadow-4.1.0/man/useradd.8	2007-12-12 14:06:31.000000000 +0100
@@ -53,6 +53,11 @@ option is not used,
 must exist\.
 .RE
 .PP
+\fB-l\fR
+.RS 4
+Do not add the user to the last login log file. This is an option added by Red Hat.
+.RE
+.PP
 \fB\-D\fR
 .RS 4
 See below, the subsection "Changing the default values"\.

shadow-4.1.0-redhat.patch:

--- NEW FILE shadow-4.1.0-redhat.patch ---
diff -up shadow-4.1.0/src/useradd.c.redhat shadow-4.1.0/src/useradd.c
--- shadow-4.1.0/src/useradd.c.redhat	2007-12-09 23:43:09.000000000 +0100
+++ shadow-4.1.0/src/useradd.c	2007-12-12 12:19:34.000000000 +0100
@@ -81,7 +81,7 @@
 static gid_t def_group = 100;
 static const char *def_gname = "other";
 static const char *def_home = "/home";
-static const char *def_shell = "";
+static const char *def_shell = "/sbin/nologin";
 static const char *def_template = SKEL_DIR;
 static const char *def_create_mail_spool = "no";
 
@@ -93,7 +93,7 @@ static char def_file[] = USER_DEFAULTS_F
 #define	VALID(s)	(strcspn (s, ":\n") == strlen (s))
 
 static const char *user_name = "";
-static const char *user_pass = "!";
+static const char *user_pass = "!!";
 static uid_t user_id;
 static gid_t user_gid;
 static const char *user_comment = "";
@@ -124,8 +124,10 @@ static int
     Gflg = 0,			/* secondary group set for new account */
     kflg = 0,			/* specify a directory to fill new user directory */
     mflg = 0,			/* create user's home directory if it doesn't exist */
-    nflg = 0,			/* create a group having the same name as the user */
+    Mflg = 0,                   /* do NOT create user's home directory no matter what */
+    nflg = 0,                   /* do NOT create a group having the same name as the user */
     oflg = 0,			/* permit non-unique user ID to be specified with -u */
+    rflg = 0,                   /* create a system account */
     sflg = 0,			/* shell program for new account */
     uflg = 0;			/* specify user ID for new account */
 
@@ -632,6 +634,8 @@ static void usage (void)
 			   "  -K, --key KEY=VALUE           overrides /etc/login.defs defaults\n"
 			   "  -m, --create-home             create home directory for the new user\n"
 			   "                                account\n"
+                           "  -M,                       do not create user's home directory(overrides /etc/login.defs)\n"
+                           "  -r,                       create system account\n"
 			   "  -o, --non-unique              allow create user with duplicate\n"
 			   "                                (non-unique) UID\n"
 			   "  -p, --password PASSWORD       use encrypted password for the new user\n"
@@ -684,11 +688,20 @@ static void new_spent (struct spwd *spen
 	spent->sp_namp = (char *) user_name;
 	spent->sp_pwdp = (char *) user_pass;
 	spent->sp_lstchg = time ((time_t *) 0) / SCALE;
-	spent->sp_min = scale_age (getdef_num ("PASS_MIN_DAYS", -1));
-	spent->sp_max = scale_age (getdef_num ("PASS_MAX_DAYS", -1));
-	spent->sp_warn = scale_age (getdef_num ("PASS_WARN_AGE", -1));
-	spent->sp_inact = scale_age (def_inactive);
-	spent->sp_expire = scale_age (user_expire);
+	if (!rflg) {
+		spent->sp_min = scale_age (getdef_num ("PASS_MIN_DAYS", -1));
+		spent->sp_max = scale_age (getdef_num ("PASS_MAX_DAYS", -1));
+		spent->sp_warn = scale_age (getdef_num ("PASS_WARN_AGE", -1));
+		spent->sp_inact = scale_age (def_inactive);
+		spent->sp_expire = scale_age (user_expire);
+	}
+	else {
+		spent->sp_min = scale_age(-1);
+                spent->sp_max = scale_age(-1);
+                spent->sp_warn = scale_age(-1);
+                spent->sp_inact = scale_age(-1);
+        	spent->sp_expire = scale_age(-1);
+	}
 	spent->sp_flag = -1;
 }
 
@@ -821,8 +834,14 @@ static void find_new_uid (void)
 	const struct passwd *pwd;
 	uid_t uid_min, uid_max;
 
-	uid_min = getdef_unum ("UID_MIN", 1000);
-	uid_max = getdef_unum ("UID_MAX", 60000);
+        if (!rflg) {
+                uid_min = getdef_unum ("UID_MIN", 500);
+                uid_max = getdef_unum ("UID_MAX", 60000);
+        }
+        else {
+                uid_min = 1;
+                uid_max = getdef_unum ("UID_MIN", 500) - 1;
+        }
 
 	/*
 	 * Start with some UID value if the user didn't provide us with
@@ -852,7 +871,7 @@ static void find_new_uid (void)
 #endif
 			exit (E_NAME_IN_USE);
 		}
-		if (uflg && user_id == pwd->pw_uid) {
+		if (!oflg && uflg && user_id == pwd->pw_uid) {
 			fprintf (stderr, _("%s: UID %u is not unique\n"),
 				 Prog, (unsigned int) user_id);
 #ifdef WITH_AUDIT
@@ -908,8 +927,13 @@ static void find_new_gid ()
 	const struct group *grp;
 	gid_t gid_min, gid_max;
 
-	gid_min = getdef_num ("GID_MIN", 500);
-	gid_max = getdef_num ("GID_MAX", 60000);
+        if (!rflg) {
+                gid_min = getdef_unum ("GID_MIN", 500);
+                gid_max = getdef_unum ("GID_MAX", 60000);
+        } else {
+                gid_min = 1;
+                gid_max = getdef_unum ("GID_MIN", 500) - 1;
+        }
 
 	/*
 	 * Start with some GID value if the user didn't provide us with
@@ -1008,7 +1032,7 @@ static void process_flags (int argc, cha
 			{NULL, 0, NULL, '\0'}
 		};
 		while ((c =
-			getopt_long (argc, argv, "b:c:d:De:f:g:G:k:K:mMop:s:u:",
+			getopt_long (argc, argv, "b:c:d:De:f:g:G:k:K:mMnrop:s:u:",
 				     long_options, NULL)) != -1) {
 			switch (c) {
 			case 'b':
@@ -1177,6 +1201,15 @@ static void process_flags (int argc, cha
 				user_id = get_uid (optarg);
 				uflg++;
 				break;
+                        case 'n':
+                                nflg++;
+                                break;
+                        case 'r':
+                                rflg++;
+                                break;
+                        case 'M':
+                                Mflg++;
+                                break;
 			default:
 				usage ();
 			}
@@ -1184,6 +1217,9 @@ static void process_flags (int argc, cha
 		}
 	}
 
+        if (mflg && Mflg) /* the admin is not decided .. create or not ? */
+               usage();
+
 	/*
 	 * Certain options are only valid in combination with others.
 	 * Check it here so that they can be specified in any order.
@@ -1698,6 +1734,14 @@ int main (int argc, char **argv)
 	}
 #endif				/* USE_PAM */
 
+        if (!rflg) /* for system accounts defaults are ignored and we
+                    * do not create a home dir -- gafton */
+        	if (getdef_bool("CREATE_HOME"))
+               		mflg = 1;
+
+        if (Mflg) /* absolutely sure that we do not create home dirs */
+        	mflg = 0;
+
 	/*
 	 * See if we are messing with the defaults file, or creating
 	 * a new user.
@@ -1728,7 +1772,7 @@ int main (int argc, char **argv)
 	 * to that group, use useradd -g username username.
 	 * --bero
 	 */
-	if (!gflg) {
+	if ( !(nflg || gflg) ) {
 		if (getgrnam (user_name)) { /* local, no need for xgetgrnam */
 			fprintf (stderr,
 				 _
@@ -1779,27 +1823,22 @@ int main (int argc, char **argv)
 				 ("%s: warning: the home directory already exists.\n"
 				  "Not copying any file from skel directory into it.\n"),
 				 Prog);
-
-	} else if (getdef_str ("CREATE_HOME")) {
-		/*
-		 * RedHat added the CREATE_HOME option in login.defs in their
-		 * version of shadow-utils (which makes -m the default, with
-		 * new -M option to turn it off). Unfortunately, this
-		 * changes the way useradd works (it can be run by scripts
-		 * expecting some standard behaviour), compared to other
-		 * Unices and other Linux distributions, and also adds a lot
-		 * of confusion :-(.
-		 * So we now recognize CREATE_HOME and give a warning here
-		 * (better than "configuration error ... notify administrator"
-		 * errors in every program that reads /etc/login.defs). -MM
-		 */
-		fprintf (stderr,
-			 _
-			 ("%s: warning: CREATE_HOME not supported, please use -m instead.\n"),
-			 Prog);
 	}
-
-	create_mail ();
+        /* Warning removed to protect the innocent. */
+        /*
+         * The whole idea about breaking some stupid scripts by creating a new
+         * variable is crap - I could care less about the scripts. Historically
+         * adduser type programs have always created the home directories and
+         * I don't like the idea of providing a script when we can fix the
+         * binary itself. And if the scripts are using the right options to the
+         * useradd then they will not break. If not, they depend on unspecified
+         * behavior and they will break, but they were broken anyway to begin
+         * with --gafton
+         */
+
+	/* Do not create mail directory for system accounts */
+	if( !rflg )
+		create_mail ();
 
 	close_files ();
 
diff -up shadow-4.1.0/src/groupadd.c.redhat shadow-4.1.0/src/groupadd.c
--- shadow-4.1.0/src/groupadd.c.redhat	2007-11-24 23:41:19.000000000 +0100
+++ shadow-4.1.0/src/groupadd.c	2007-12-12 12:15:00.000000000 +0100
@@ -74,6 +74,7 @@ static char *Prog;
 static int oflg = 0;		/* permit non-unique group ID to be specified with -g */
 static int gflg = 0;		/* ID value for the new group */
 static int fflg = 0;		/* if group already exists, do nothing and exit(0) */
+static int rflg = 0;            /* for adding system accounts (Red Hat) */
 
 /* local function prototypes */
 static void usage (void);
@@ -100,6 +101,7 @@ static void usage (void)
 			   "Options:\n"
 			   "  -f, --force                   force exit with success status if the\n"
 			   "                                specified group already exists\n"
+                           "  -r,                           create system account\n"
 			   "  -g, --gid GID                 use GID for the new group\n"
 			   "  -h, --help                    display this help message and exit\n"
 			   "  -K, --key KEY=VALUE           overrides /etc/login.defs defaults\n"
@@ -198,8 +200,13 @@ static void find_new_gid (void)
 	const struct group *grp;
 	gid_t gid_min, gid_max;
 
-	gid_min = getdef_unum ("GID_MIN", 1000);
-	gid_max = getdef_unum ("GID_MAX", 60000);
+	if (!rflg) {
+		gid_min = getdef_unum ("GID_MIN", 500);
+                gid_max = getdef_unum ("GID_MAX", 60000);
+        } else {
+                gid_min = 1;
+                gid_max = getdef_unum ("GID_MIN", 500) - 1;
+        }
 
 	/*
 	 * Start with some GID value if the user didn't provide us with
@@ -430,7 +437,7 @@ int main (int argc, char **argv)
 		};
 
 		while ((c =
-			getopt_long (argc, argv, "fg:hK:o", long_options,
+			getopt_long (argc, argv, "frg:hK:o", long_options,
 				     &option_index)) != -1) {
 			switch (c) {
 			case 'f':
@@ -443,6 +450,12 @@ int main (int argc, char **argv)
 				 */
 				fflg++;
 				break;
+	                case 'r':
+	                        /*
+	                         * create a system group
+	                         */
+	                        rflg++;
+	                        break;
 			case 'g':
 				gflg++;
 				group_id = get_gid (optarg);
diff -up shadow-4.1.0/man/chpasswd.8.redhat shadow-4.1.0/man/chpasswd.8
diff -up shadow-4.1.0/man/newusers.8.redhat shadow-4.1.0/man/newusers.8
diff -up shadow-4.1.0/man/useradd.8.redhat shadow-4.1.0/man/useradd.8
--- shadow-4.1.0/man/useradd.8.redhat	2007-12-10 00:07:10.000000000 +0100
+++ shadow-4.1.0/man/useradd.8	2007-12-12 12:05:54.000000000 +0100
@@ -25,9 +25,9 @@ When invoked without the
 \fB\-D\fR
 option, the
 \fBuseradd\fR
-command creates a new user account using the values specified on the command line plus the default values from the system\. Depending on command line options, the
+command creates a new user account using the values specified on the command line and the default values from the system. Depending on command line options, the 
 \fBuseradd\fR
-command will update system files and may also create the new user\'s home directory and copy initial files\.
+command will update system files and may also create the new user's home directory and copy initial files. The version provided with Red Hat Linux will create a group for each user added to the system by default.
 .SH "OPTIONS"
 .PP
 The options which apply to the
@@ -84,7 +84,7 @@ The number of days after a password expi
 .PP
 \fB\-g\fR, \fB\-\-gid\fR \fIGROUP\fR
 .RS 4
-The group name or number of the user\'s initial login group\. The group name must exist\. A group number must refer to an already existing group\. The default group number is 1 or whatever is specified in
+The group name or number of the user\'s initial login group\. The group name must exist\. A group number must refer to an already existing group\.
 \fI/etc/default/useradd\fR\.
 .RE
 .PP
@@ -100,6 +100,13 @@ option\. The default is for the user to 
 Display help message and exit\.
 .RE
 .PP
+\fB-M\fR
+.RS 4
+The user\'s home directory will not be created, even if the system wide settings from 
+\fI/etc/login.defs\fR 
+is to create home dirs\.
+.RE
+.PP
 \fB\-m\fR, \fB\-\-create\-home\fR
 .RS 4
 The user\'s home directory will be created if it does not exist\. The files contained in
@@ -119,6 +126,13 @@ option is only valid in conjunction with
 option\. The default is to not create the directory and to not copy any files\.
 .RE
 .PP
+\fB-n\fR
+.RS 4
+A group having the same name as the user being added to the system will be created by default\. This option will turn off this Red Hat Linux specific behavior\. When this option is used, users by default will be placed in whatever group is specified in 
+\fI/etc/default/useradd\fR\. 
+If no default group is defined, group 1 will be used.
+.RE
+.PP
 \fB\-K\fR, \fB\-\-key\fR \fIKEY\fR=\fIVALUE\fR
 .RS 4
 Overrides /etc/login\.defs defaults (UID_MIN, UID_MAX, UMASK, PASS_MAX_DAYS and others)\.
@@ -150,6 +164,19 @@ The encrypted password, as returned by
 \fBcrypt\fR(3)\. The default is to disable the account\.
 .RE
 .PP
+\fB-r\fR
+.RS 4
+This flag is used to create a system account\. That is, a user with a UID lower than the value of UID_MIN defined in 
+\fI/etc/login.defs\fR 
+and whose password does not expire\. Note that 
+\fBuseradd\fR 
+will not create a home directory for such an user, regardless of the default setting in 
+\fI/etc/login.defs\fR\. 
+You have to specify 
+\fB-m\fR 
+option if you want a home directory for a system account to be created\. This is an option added by Red Hat\.
+.RE
+.PP
 \fB\-s\fR, \fB\-\-shell\fR \fISHELL\fR
 .RS 4
 The name of the user\'s login shell\. The default is to leave this field blank, which causes the system to select the default login shell\.
@@ -206,6 +233,8 @@ The name of a new user\'s login shell\.
 The system administrator is responsible for placing the default user files in the
 \fI/etc/skel/\fR
 directory\.
+.br
+This version of useradd was modified by Red Hat to suit Red Hat user/group conventions\.
 .SH "CAVEATS"
 .PP
 You may not add a user to a NIS or LDAP group\. This must be performed on the corresponding server\.
@@ -315,6 +344,11 @@ Secure user account information\.
 Group account information\.
 .RE
 .PP
+\fI/etc/gshadow\fR
+.RS 4
+Secure group account information\.
+.RE
+.PP
 \fI/etc/default/useradd\fR
 .RS 4
 Default values for account creation\.
diff -up shadow-4.1.0/man/groupadd.8.redhat shadow-4.1.0/man/groupadd.8
--- shadow-4.1.0/man/groupadd.8.redhat	2007-12-10 00:06:00.000000000 +0100
+++ shadow-4.1.0/man/groupadd.8	2007-12-12 12:11:23.000000000 +0100
@@ -14,7 +14,7 @@
 groupadd - create a new group
 .SH "SYNOPSIS"
 .HP 9
-\fBgroupadd\fR [\-g\ \fIGID\fR\ [\-o]] [\-f] [\-K\ \fIKEY\fR=\fIVALUE\fR] \fIgroup\fR
+\fBgroupadd\fR [\-g\ \fIgid\fR\ [\-o]] [\-r] [\-f] [\-K\ \fIKEY\fR=\fIVALUE\fR] \fIgroup\fR
 .SH "DESCRIPTION"
 .PP
 The
@@ -34,11 +34,22 @@ This option causes the command to simply
 is turned off)\.
 .RE
 .PP
+\fB-r\fR
+.RS 4
+This flag instructs 
+\fBgroupadd\fR 
+to add a system account\.  The first available 
+\fIgid\fR 
+lower than 499 will be automatically selected unless the 
+\fB-g\fR 
+option is also given on the command line\. This is an option added by Red Hat\.
+.RE
+.PP
 \fB\-g\fR \fIGID\fR
 .RS 4
 The numerical value of the group\'s ID\. This value must be unique, unless the
 \fB\-o\fR
-option is used\. The value must be non\-negative\. The default is to use the smallest ID value greater than 999 and greater than every other group\. Values between 0 and 999 are typically reserved for system accounts\.
+option is used\. The value must be non\-negative\. The default is to use the smallest ID value greater than 500 and greater than every other group\. Values between 0 and 499 are typically reserved for system accounts\.
 .RE
 .PP
 \fB\-h\fR, \fB\-\-help\fR

shadow-4.1.0-selinux.patch:

--- NEW FILE shadow-4.1.0-selinux.patch ---
diff -up /dev/null shadow-4.1.0/libmisc/system.c
--- /dev/null	2007-12-08 00:31:02.590331462 +0100
+++ shadow-4.1.0/libmisc/system.c	2007-12-12 14:13:30.000000000 +0100
@@ -0,0 +1,37 @@
+#include <config.h>
+
+#ident "$Id: shell.c,v 1.13 2006/01/18 19:38:27 kloczek Exp $"
+
+#include <stdio.h>
+#include <sys/wait.h>
+#include <fcntl.h>
+#include "prototypes.h"
+#include "defines.h"
+
+int safe_system(const char *command, const char *argv[], const char *env[], int ignore_stderr)
+{
+	int status = -1;
+	int fd;
+	pid_t pid;
+	
+	pid = fork();
+	if (pid < 0) 
+		return -1;
+
+	if (pid) {       /* Parent */
+		waitpid(pid, &status, 0);
+		return status;
+	}
+
+	fd = open("/dev/null", O_RDWR);
+	/* Child */
+	dup2(fd,0);	// Close Stdin
+	if (ignore_stderr)
+		dup2(fd,2);	// Close Stderr
+	
+	execve(command, (char *const *) argv, (char *const *) env);
+	fprintf (stderr,
+		 _("Failed to exec '%s'\n"), argv[0]);
+	exit (-1);
+}
+
diff -up shadow-4.1.0/libmisc/copydir.c.selinux shadow-4.1.0/libmisc/copydir.c
--- shadow-4.1.0/libmisc/copydir.c.selinux	2007-11-11 00:45:59.000000000 +0100
+++ shadow-4.1.0/libmisc/copydir.c	2007-12-12 14:13:30.000000000 +0100
@@ -54,7 +54,7 @@ struct link_name {
 static struct link_name *links;
 
 #ifdef WITH_SELINUX
-static int selinux_file_context (const char *dst_name)
+int selinux_file_context (const char *dst_name)
 {
 	security_context_t scontext = NULL;
 
diff -up shadow-4.1.0/libmisc/Makefile.am.selinux shadow-4.1.0/libmisc/Makefile.am
--- shadow-4.1.0/libmisc/Makefile.am.selinux	2007-11-23 10:15:48.000000000 +0100
+++ shadow-4.1.0/libmisc/Makefile.am	2007-12-12 14:13:30.000000000 +0100
@@ -42,6 +42,7 @@ libmisc_a_SOURCES = \
 	setugid.c \
 	setupenv.c \
 	shell.c \
+	system.c \
 	strtoday.c \
 	sub.c \
 	sulog.c \
diff -up shadow-4.1.0/src/useradd.c.selinux shadow-4.1.0/src/useradd.c
--- shadow-4.1.0/src/useradd.c.selinux	2007-12-12 14:11:41.000000000 +0100
+++ shadow-4.1.0/src/useradd.c	2007-12-12 14:24:12.000000000 +0100
@@ -100,6 +100,7 @@ static const char *user_comment = "";
 static const char *user_home = "";
 static const char *user_shell = "";
 static const char *create_mail_spool = "";
+static const char *user_selinux = "";
 
 static long user_expire = -1;
 static int is_shadow_pwd;
@@ -170,6 +171,7 @@ static int set_defaults (void);
 static int get_groups (char *);
 static void usage (void);
 static void new_pwent (struct passwd *);
+static void selinux_update_mapping (void);
 
 static long scale_age (long);
 static void new_spent (struct spwd *);
@@ -356,6 +358,7 @@ static void get_defaults (void)
 			def_create_mail_spool = xstrdup (cp);
 		}
 	}
+	fclose(fp);
 }
 
 /*
@@ -644,6 +647,10 @@ static void usage (void)
 			   "                                account\n"
 			   "  -s, --shell SHELL             the login shell for the new user account\n"
 			   "  -u, --uid UID                 force use the UID for the new user account\n"
+#ifdef WITH_SELINUX
+                           "  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping\n"
+#endif
+
 			   "\n"));
 	exit (E_USAGE);
 }
@@ -1030,11 +1037,18 @@ static void process_flags (int argc, cha
 			{"non-unique", no_argument, NULL, 'o'},
 			{"password", required_argument, NULL, 'p'},
 			{"shell", required_argument, NULL, 's'},
+#ifdef WITH_SELINUX
+			{"selinux-user", required_argument, NULL, 'Z'},
+#endif
 			{"uid", required_argument, NULL, 'u'},
 			{NULL, 0, NULL, '\0'}
 		};
 		while ((c =
+#ifdef WITH_SELINUX
+			getopt_long (argc, argv, "b:c:d:De:f:g:G:k:K:mlMnrop:s:u:Z:",
+#else
 			getopt_long (argc, argv, "b:c:d:De:f:g:G:k:K:mlMnrop:s:u:",
+#endif
 				     long_options, NULL)) != -1) {
 			switch (c) {
 			case 'b':
@@ -1215,6 +1229,17 @@ static void process_flags (int argc, cha
                         case 'M':
                                 Mflg++;
                                 break;
+#ifdef WITH_SELINUX
+                        case 'Z':
+				if (is_selinux_enabled() > 0)
+					user_selinux = optarg;
+				else {
+					fprintf (stderr,_("%s: -Z requires SELinux enabled kernel\n"), Prog);
+
+					exit (E_BAD_ARG);
+				}
+                                break;
+#endif
 			default:
 				usage ();
 			}
@@ -1583,6 +1608,33 @@ static void usr_update (void)
 		grp_update ();
 }
 
+static void selinux_update_mapping () {
+
+#ifdef WITH_SELINUX
+	if (is_selinux_enabled() <= 0) return;
+
+        if (*user_selinux) { /* must be done after passwd write() */
+		const char *argv[7];
+		argv[0] = "/usr/sbin/semanage";
+		argv[1] = "login";
+		argv[2] = "-a";
+		argv[3] = "-s";
+		argv[4] = user_selinux;
+		argv[5] = user_name;
+		argv[6] = NULL;
+                if (safe_system(argv[0], argv, NULL, 0)) {
+			fprintf (stderr,
+				 _("%s: warning: the user name %s to %s SELinux user mapping failed.\n"),
+				 Prog, user_name, user_selinux);
+#ifdef WITH_AUDIT
+			audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
+				      "adding SELinux user mapping", user_name, user_id, 0);
+#endif        
+		}
+	}
+#endif
+
+}
 /*
  * create_home - create the user's home directory
  *
@@ -1592,7 +1644,11 @@ static void usr_update (void)
  */
 static void create_home (void)
 {
+
 	if (access (user_home, F_OK)) {
+#ifdef WITH_SELINUX
+		selinux_file_context (user_home);
+#endif
 		/* XXX - create missing parent directories.  --marekm */
 		if (mkdir (user_home, 0)) {
 			fprintf (stderr,
@@ -1818,6 +1874,8 @@ int main (int argc, char **argv)
 
 	usr_update ();
 
+	selinux_update_mapping();
+
 	if (mflg) {
 		create_home ();
 		if (home_added)
diff -up shadow-4.1.0/src/usermod.c.selinux shadow-4.1.0/src/usermod.c
--- shadow-4.1.0/src/usermod.c.selinux	2007-11-24 23:41:19.000000000 +0100
+++ shadow-4.1.0/src/usermod.c	2007-12-12 14:21:44.000000000 +0100
@@ -90,6 +90,7 @@ static char *user_comment;
 static char *user_home;
 static char *user_newhome;
 static char *user_shell;
+static const char *user_selinux = "";
 static long user_expire;
 static long user_inactive;
 static long sys_ngroups;
@@ -139,6 +140,7 @@ static int sgr_locked = 0;
 static int get_groups (char *);
 static void usage (void);
 static void new_pwent (struct passwd *);
+static void selinux_update_mapping (void);
 
 static void new_spent (struct spwd *);
 static void fail_exit (int);
@@ -302,6 +304,9 @@ static void usage (void)
 			   "  -s, --shell SHELL             new login shell for the user account\n"
 			   "  -u, --uid UID                 new UID for the user account\n"
 			   "  -U, --unlock                  unlock the user account\n"
+#ifdef WITH_SELINUX
+                           "  -Z, --selinux-user            new selinux user mapping for the user account\n"
+#endif
 			   "\n"));
 	exit (E_USAGE);
 }
@@ -888,13 +893,20 @@ static void process_flags (int argc, cha
 			{"move-home", no_argument, NULL, 'm'},
 			{"non-unique", no_argument, NULL, 'o'},
 			{"password", required_argument, NULL, 'p'},
+#ifdef WITH_SELINUX
+			{"selinux-user", required_argument, NULL, 'Z'},
+#endif
 			{"shell", required_argument, NULL, 's'},
 			{"uid", required_argument, NULL, 'u'},
 			{"unlock", no_argument, NULL, 'U'},
 			{NULL, 0, NULL, '\0'}
 		};
 		while ((c =
+#ifdef WITH_SELINUX
+			getopt_long (argc, argv, "ac:d:e:f:g:G:hl:Lmop:s:u:UZ:",
+#else
 			getopt_long (argc, argv, "ac:d:e:f:g:G:hl:Lmop:s:u:U",
+#endif
 				     long_options, NULL)) != -1) {
 			switch (c) {
 			case 'a':
@@ -1028,6 +1040,16 @@ static void process_flags (int argc, cha
 			case 'U':
 				Uflg++;
 				break;
+#ifdef WITH_SELINUX
+                        case 'Z':
+				if (is_selinux_enabled() > 0)
+					user_selinux = optarg;
+				else {
+					fprintf (stderr, _("%s: -Z requires SELinux enabled kernel\n"), Prog);
+					exit (E_BAD_ARG);
+				}
+                                break;
+#endif
 			default:
 				usage ();
 			}
@@ -1575,6 +1597,8 @@ int main (int argc, char **argv)
 	nscd_flush_cache ("passwd");
 	nscd_flush_cache ("group");
 
+	selinux_update_mapping();
+
 	if (mflg)
 		move_home ();
 
@@ -1603,3 +1627,62 @@ int main (int argc, char **argv)
 	exit (E_SUCCESS);
 	/* NOT REACHED */
 }
+
+static void selinux_update_mapping () {
+#ifdef WITH_SELINUX
+	const char *argv[7];
+
+	if (is_selinux_enabled() <= 0) return;
+
+        if (*user_selinux) { 
+		argv[0] = "/usr/sbin/semanage";
+		argv[1] = "login";
+		argv[2] = "-m";
+		argv[3] = "-s";
+		argv[4] = user_selinux;
+		argv[5] = user_name;
+		argv[6] = NULL;
+                if (safe_system(argv[0], argv, NULL, 1)) {
+			argv[2] = "-a";
+			if (safe_system(argv[0], argv, NULL, 0)) {
+				fprintf (stderr,
+					 _("%s: warning: the user name %s to %s SELinux user mapping failed.\n"),
+					 Prog, user_name, user_selinux);
+#ifdef WITH_AUDIT
+				audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
+					      "modifying User mapping ", user_name, user_id, 0);
+#endif        
+			}
+		}
+        }
+        
+	if (dflg || *user_selinux) {
+		argv[0] = "/usr/sbin/genhomedircon";
+		argv[1] = NULL;
+		if(safe_system(argv[0], argv, NULL,0)) {
+			fprintf (stderr,
+				 _("%s: warning: unable to relabel the homedir %s for %s.\n"),
+				 Prog, user_home, user_name);
+#ifdef WITH_AUDIT
+			audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
+			      "relabeling home directory", user_name, user_id, 0);
+#endif
+		}
+
+		argv[0] = "/sbin/restorecon";
+		argv[1] = "-F";
+		argv[2] = "-R";
+		argv[3] = user_home;
+		argv[4] = NULL;
+                if (safe_system(argv[0], argv, NULL, 0)) {
+			fprintf (stderr,
+				 _("%s: warning: unable to relabel the homedir %s for %s.\n"),
+				 Prog, user_home, user_name);
+#ifdef WITH_AUDIT
+			audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
+				      "relabeling home directory", user_name, user_id, 0);
+#endif        
+		}
+	}
+#endif
+}
diff -up shadow-4.1.0/src/userdel.c.selinux shadow-4.1.0/src/userdel.c
--- shadow-4.1.0/src/userdel.c.selinux	2007-11-24 23:41:19.000000000 +0100
+++ shadow-4.1.0/src/userdel.c	2007-12-12 14:13:30.000000000 +0100
@@ -809,6 +809,17 @@ int main (int argc, char **argv)
 #endif
 	}
 
+#ifdef WITH_SELINUX
+	if (is_selinux_enabled() > 0) { 
+		const char *argv[5];
+		argv[0] = "/usr/sbin/semanage";
+		argv[1] = "login";
+		argv[2] = "-d";
+		argv[3] = user_name;
+		argv[4] = NULL;
+                safe_system(argv[0], argv, NULL, 1);
+        }
+#endif        
 	/*
 	 * Cancel any crontabs or at jobs. Have to do this before we remove
 	 * the entry from /etc/passwd.
diff -up shadow-4.1.0/man/useradd.8.selinux shadow-4.1.0/man/useradd.8
--- shadow-4.1.0/man/useradd.8.selinux	2007-12-12 14:11:41.000000000 +0100
+++ shadow-4.1.0/man/useradd.8	2007-12-12 14:19:21.000000000 +0100
@@ -163,6 +163,11 @@ doesn\'t work yet\.
 Allow the creation of a user account with a duplicate (non\-unique) UID\.
 .RE
 .PP
+\fB\-Z\fR, \fB\-\-selinux-user\fR \fISEUSER\fR
+.RS 4
+The SELinux user for the user\'s login\. The default is to leave this field blank, which causes the system to select the default SELinux user\.
+.RE
+.PP
 \fB\-p\fR, \fB\-\-password\fR \fIPASSWORD\fR
 .RS 4
 The encrypted password, as returned by
diff -up shadow-4.1.0/man/usermod.8.xml.selinux shadow-4.1.0/man/usermod.8.xml
--- shadow-4.1.0/man/usermod.8.xml.selinux	2007-12-09 00:24:36.000000000 +0100
+++ shadow-4.1.0/man/usermod.8.xml	2007-12-12 14:13:30.000000000 +0100
@@ -245,6 +245,19 @@
 	  </para>
 	</listitem>
       </varlistentry>
+       <varlistentry>
+        <term>
+         <option>-Z</option>, <option>--selinux-user</option>
+         <replaceable>SEUSER</replaceable>
+       </term>
+       <listitem>
+         <para>
+           The SELinux user for the user's login. The default is to leave this
+           field the blank, which causes the system to select the default
+           SELinux user.
+         </para>
+       </listitem>
+      </varlistentry>
     </variablelist>
   </refsect1>
 
diff -up shadow-4.1.0/man/usermod.8.selinux shadow-4.1.0/man/usermod.8
--- shadow-4.1.0/man/usermod.8.selinux	2007-12-10 00:07:16.000000000 +0100
+++ shadow-4.1.0/man/usermod.8	2007-12-12 14:17:10.000000000 +0100
@@ -133,6 +133,11 @@ Note: if you wish to unlock the account 
 value from
 \fI/etc/default/useradd\fR)\.
 .RE
+.PP
+\fB\-Z\fR, \fB\-\-selinux-user\fR \fISEUSER\fR
+.RS 4
+The SELinux user for the user\'s login\. The default is to leave this field blank, which causes the system to select the default SELinux user.
+.RE
 .SH "CAVEATS"
 .PP
 
diff -up shadow-4.1.0/man/useradd.8.xml.selinux shadow-4.1.0/man/useradd.8.xml
--- shadow-4.1.0/man/useradd.8.xml.selinux	2007-12-09 00:24:36.000000000 +0100
+++ shadow-4.1.0/man/useradd.8.xml	2007-12-12 14:13:30.000000000 +0100
@@ -274,6 +274,19 @@
 	  </para>
 	</listitem>
       </varlistentry>
+      <varlistentry>
+	<term>
+	  <option>-Z</option>, <option>--selinux-user</option>
+	  <replaceable>SEUSER</replaceable>
+	</term>
+	<listitem>
+	  <para>
+	    The SELinux user for the user's login. The default is to leave this
+	    field blank, which causes the system to select the default SELinux
+            user.
+	  </para>
+	</listitem>
+      </varlistentry>
     </variablelist>
 
     <refsect2 id='changing_the_default_values'>
diff -up shadow-4.1.0/lib/defines.h.selinux shadow-4.1.0/lib/defines.h
--- shadow-4.1.0/lib/defines.h.selinux	2007-11-24 12:18:35.000000000 +0100
+++ shadow-4.1.0/lib/defines.h	2007-12-12 14:13:30.000000000 +0100
@@ -342,4 +342,7 @@ extern char *strerror ();
 #include <libaudit.h>
 #endif
 
+#ifdef WITH_SELINUX
+#include <selinux/selinux.h>
+#endif
 #endif				/* _DEFINES_H_ */
diff -up shadow-4.1.0/lib/prototypes.h.selinux shadow-4.1.0/lib/prototypes.h
--- shadow-4.1.0/lib/prototypes.h.selinux	2007-11-23 21:10:52.000000000 +0100
+++ shadow-4.1.0/lib/prototypes.h	2007-12-12 14:13:30.000000000 +0100
@@ -53,6 +53,9 @@ extern int is_listed (const char *, cons
 /* copydir.c */
 extern int copy_tree (const char *, const char *, uid_t, gid_t);
 extern int remove_tree (const char *);
+#ifdef WITH_SELINUX
+extern int selinux_file_context (const char *dst_name);
+#endif
 
 /* encrypt.c */
 extern char *pw_encrypt (const char *, const char *);
@@ -151,6 +154,9 @@ extern void setup_env (struct passwd *);
 /* shell.c */
 extern int shell (const char *, const char *, char *const *);
 
+/* system.c */
+extern int safe_system(const char *command, const char *argv[], const char *env[], int ignore_stderr);
+
 /* strtoday.c */
 extern long strtoday (const char *);
 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/shadow-utils/devel/.cvsignore,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- .cvsignore	1 Nov 2006 13:49:50 -0000	1.16
+++ .cvsignore	12 Dec 2007 15:07:44 -0000	1.17
@@ -1,5 +1,3 @@
-shadow-4.0.16.tar.bz2
-shadow-4.0.16-nscd.c
-shadow-4.0.17.tar.bz2
 shadow-4.0.17-login.defs
-shadow-4.0.18.1.tar.bz2
+shadow-4.0.18.1-useradd
+shadow-4.1.0.tar.bz2


Index: shadow-utils.spec
===================================================================
RCS file: /cvs/extras/rpms/shadow-utils/devel/shadow-utils.spec,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- shadow-utils.spec	29 Nov 2007 15:08:46 -0000	1.107
+++ shadow-utils.spec	12 Dec 2007 15:07:44 -0000	1.108
@@ -4,31 +4,22 @@
 
 Summary: Utilities for managing accounts and shadow password files
 Name: shadow-utils
-Version: 4.0.18.1
-Release: 20%{?dist}
+Version: 4.1.0
+Release: 1%{?dist}
 Epoch: 2
-URL: http://shadow.pld.org.pl/
-Source0: ftp://ftp.pld.org.pl/software/shadow/shadow-%{version}.tar.bz2
+URL: http://pkg-shadow.alioth.debian.org/
+Source0: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-%{version}.tar.bz2
 Source1: shadow-4.0.17-login.defs
 Source2: shadow-4.0.18.1-useradd
-Source3: shadow-4.0.16-nscd.c
-Patch0: shadow-4.0.17-redhat.patch
+
+Patch0: shadow-4.1.0-redhat.patch
 Patch1: shadow-4.0.3-noinst.patch
-Patch2: shadow-4.0.11.1-vipw.patch
-Patch3: shadow-4.0.14-goodname.patch
-Patch4: shadow-4.0.13-newgrpPwd.patch
-Patch5: shadow-4.0.16-lOption.patch
-Patch6: shadow-4.0.17-notInheritFd.patch
-Patch7: shadow-4.0.17-exitValues.patch
-Patch8: shadow-4.0.17-auditLogging.patch
-Patch9: shadow-4.0.18.1-gid.patch
-Patch10: shadow-4.0.18.1-overflow.patch
-Patch11: shadow-4.0.17-useradd.patch
-Patch12: shadow-4.0.18.1-appendOption.patch
-Patch13: shadow-4.0.18.1-sysAccount.patch
-Patch14: shadow-4.0.18.1-findNewUidOnce.patch
-Patch15: shadow-4.0.18.1-groupLoop.patch
-Patch16: shadow-4.0.18.1-mtime.patch
+Patch2: shadow-4.1.0-goodname.patch
+Patch3: shadow-4.1.0-lOption.patch
+Patch4: shadow-4.1.0-selinux.patch
+Patch5: shadow-4.0.18.1-sysAccount.patch
+Patch6: shadow-4.0.18.1-findNewUidOnce.patch
+Patch7: shadow-4.0.18.1-mtime.patch
 
 License: BSD
 Group: System Environment/Base
@@ -55,25 +46,12 @@
 %setup -q -n shadow-%{version}
 %patch0 -p1 -b .redhat
 %patch1 -p1 -b .noinst
-%patch2 -p1 -b .vipw
-%patch3 -p1 -b .goodname
-%patch4 -p1 -b .newgrpPwd
-%patch5 -p1 -b .lOption
-
-#replace whole file
-cp %{SOURCE3} lib/nscd.c
-%patch6 -p1 -b .notInheritFd
-
-%patch7 -p1 -b .exitValues
-%patch8 -p1 -b .auditLogging
-%patch9 -p1 -b .gid
-%patch10 -p1 -b .overflow
-%patch11 -p1 -b .useradd
-%patch12 -p1 -b .appendOption
-%patch13 -p1 -b .sysAccount
-%patch14 -p1 -b .findNewUidOnce
-%patch15 -p1 -b .groupLoop
-%patch16 -p1 -b .mtime
+%patch2 -p1 -b .goodname
+%patch3 -p1 -b .lOption
+%patch4 -p1 -b .selinux
+%patch5 -p1 -b .sysAccount
+%patch6 -p1 -b .findNewUidOnce
+%patch7 -p1 -b .mtime
 
 rm po/*.gmo
 rm po/stamp-po
@@ -123,8 +101,6 @@
 rm $RPM_BUILD_ROOT/%{_sysconfdir}/login.access
 rm $RPM_BUILD_ROOT/%{_sysconfdir}/limits
 rm $RPM_BUILD_ROOT/%{_sbindir}/logoutd
-rm $RPM_BUILD_ROOT/%{_sbindir}/vipw
-rm $RPM_BUILD_ROOT/%{_sbindir}/vigr
 rm $RPM_BUILD_ROOT/%{_sbindir}/nologin
 rm $RPM_BUILD_ROOT/%{_sbindir}/chgpasswd
 rm $RPM_BUILD_ROOT/%{_mandir}/man1/chfn.*
@@ -153,12 +129,8 @@
 rm $RPM_BUILD_ROOT/%{_mandir}/*/man5/suauth.*
 rm $RPM_BUILD_ROOT/%{_mandir}/man8/logoutd.*
 rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/logoutd.*
-rm $RPM_BUILD_ROOT/%{_mandir}/man8/vipw.*
-rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/vipw.*
 rm $RPM_BUILD_ROOT/%{_mandir}/man8/nologin.*
 rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/nologin.*
-rm $RPM_BUILD_ROOT/%{_mandir}/man8/vigr.*
-rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/vigr.*
 rm $RPM_BUILD_ROOT/%{_mandir}/man8/chgpasswd.*
 rm $RPM_BUILD_ROOT/%{_mandir}/*/man8/chgpasswd.*
 
@@ -193,6 +165,8 @@
 %{_sbindir}/*conv
 %{_sbindir}/chpasswd
 %{_sbindir}/newusers
+%{_sbindir}/vipw
+%{_sbindir}/vigr
 %{_mandir}/man1/chage.1*
 %{_mandir}/man1/gpasswd.1*
 %{_mandir}/man1/sg.1*
@@ -213,8 +187,14 @@
 %{_mandir}/man8/*conv.8*
 %{_mandir}/man8/lastlog.8*
 %{_mandir}/man8/faillog.8*
+%{_mandir}/man8/vipw.8*
+%{_mandir}/man8/vigr.8*
 
 %changelog
+* Wed Dec 12 2007 Peter Vrabec <pvrabec at redhat.com> 2:4.1.0-1
+- new upgrade release from new upstream
+- provide vipw and vigr
+
 * Thu Nov 29 2007 Peter Vrabec <pvrabec at redhat.com> 2:4.0.18.1-20
 - do not create mail spool entries for system accounts (#402351)
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/shadow-utils/devel/sources,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- sources	6 Dec 2006 16:00:06 -0000	1.17
+++ sources	12 Dec 2007 15:07:44 -0000	1.18
@@ -1,3 +1,3 @@
-7ebc6a5cd0207246a6b2c9ebf9b30391  shadow-4.0.16-nscd.c
-e7751d46ecf219c07ae0b028ab3335c6  shadow-4.0.18.1.tar.bz2
 e91727c55dbafc9915250e31535f13bb  shadow-4.0.17-login.defs
+ebdf46b79f9b414353c9ae8aba4d55cc  shadow-4.0.18.1-useradd
+dd6ca3ac424b447962d7a7af923b7bda  shadow-4.1.0.tar.bz2


--- shadow-4.0.11.1-vipw.patch DELETED ---


--- shadow-4.0.13-newgrpPwd.patch DELETED ---


--- shadow-4.0.14-goodname.patch DELETED ---


--- shadow-4.0.16-lOption.patch DELETED ---


--- shadow-4.0.17-auditLogging.patch DELETED ---


--- shadow-4.0.17-exitValues.patch DELETED ---


--- shadow-4.0.17-notInheritFd.patch DELETED ---


--- shadow-4.0.17-redhat.patch DELETED ---


--- shadow-4.0.17-useradd.patch DELETED ---


--- shadow-4.0.18.1-appendOption.patch DELETED ---


--- shadow-4.0.18.1-gid.patch DELETED ---


--- shadow-4.0.18.1-groupLoop.patch DELETED ---


--- shadow-4.0.18.1-overflow.patch DELETED ---


--- shadow-4.0.18.1-useradd DELETED ---




More information about the fedora-extras-commits mailing list