[Pkg-shadow-commits] r1326 - debian/trunk/debian/patches

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sun Oct 28 17:07:45 UTC 2007


Author: nekral-guest
Date: 2007-10-28 17:07:45 +0000 (Sun, 28 Oct 2007)
New Revision: 1326

Modified:
   debian/trunk/debian/patches/467_useradd_-r_LSB
Log:
Update for 4.0.18.2.
Simplification of the patch. Prefer maintainability to indentation.


Modified: debian/trunk/debian/patches/467_useradd_-r_LSB
===================================================================
--- debian/trunk/debian/patches/467_useradd_-r_LSB	2007-10-28 17:02:44 UTC (rev 1325)
+++ debian/trunk/debian/patches/467_useradd_-r_LSB	2007-10-28 17:07:45 UTC (rev 1326)
@@ -6,10 +6,10 @@
                      is really ready to apply it. We apply it anyway because 
                      LSB compliance is important for Debian
 
-Index: shadow-4.0.18.1/src/useradd.c
+Index: shadow-4.0.18.2/src/useradd.c
 ===================================================================
---- shadow-4.0.18.1.orig/src/useradd.c	2006-09-17 12:18:01.140062412 +0200
-+++ shadow-4.0.18.1/src/useradd.c	2006-09-17 12:18:05.004093135 +0200
+--- shadow-4.0.18.2.orig/src/useradd.c	2007-10-28 17:20:37.000000000 +0100
++++ shadow-4.0.18.2/src/useradd.c	2007-10-28 18:04:50.000000000 +0100
 @@ -127,6 +127,7 @@
      mflg = 0,			/* create user's home directory if it doesn't exist */
      nflg = 0,			/* create a group having the same name as the user */
@@ -18,7 +18,7 @@
      sflg = 0,			/* shell program for new account */
      uflg = 0;			/* specify user ID for new account */
  
-@@ -638,6 +639,7 @@
+@@ -639,6 +640,7 @@
  			   "				(non-unique) UID\n"
  			   "  -p, --password PASSWORD	use encrypted password for the new user\n"
  			   "				account\n"
@@ -26,7 +26,7 @@
  			   "  -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"
  			   "\n"));
-@@ -686,11 +688,19 @@
+@@ -687,11 +689,19 @@
  	spent->sp_namp = (char *) user_name;
  	spent->sp_pwdp = (char *) user_pass;
  	spent->sp_lstchg = time ((time_t *) 0) / SCALE;
@@ -51,7 +51,7 @@
  	spent->sp_flag = -1;
  }
  
-@@ -838,8 +848,13 @@
+@@ -839,8 +849,13 @@
  	const struct passwd *pwd;
  	uid_t uid_min, uid_max;
  
@@ -67,7 +67,7 @@
  
  	/*
  	 * Start with some UID value if the user didn't provide us with
-@@ -1018,12 +1033,13 @@
+@@ -1019,12 +1034,13 @@
  			{"create-home", no_argument, NULL, 'm'},
  			{"non-unique", no_argument, NULL, 'o'},
  			{"password", required_argument, NULL, 'p'},
@@ -82,7 +82,7 @@
  				     long_options, NULL)) != -1) {
  			switch (c) {
  			case 'b':
-@@ -1177,6 +1193,9 @@
+@@ -1178,6 +1194,9 @@
  				}
  				user_pass = optarg;
  				break;
@@ -92,49 +92,20 @@
  			case 's':
  				if (!VALID (optarg)
  				    || (optarg[0]
-@@ -1569,24 +1588,27 @@
+@@ -1570,6 +1589,8 @@
   */
  static void create_home (void)
  {
--	if (access (user_home, F_OK)) {
--		/* XXX - create missing parent directories.  --marekm */
--		if (mkdir (user_home, 0)) {
--			fprintf (stderr,
--				 _
--				 ("%s: cannot create directory %s\n"),
--				 Prog, user_home);
--			fail_exit (E_HOMEDIR);
--		}
--		chown (user_home, user_id, user_gid);
--		chmod (user_home,
--		       0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
--		home_added++;
--#ifdef WITH_AUDIT
--		audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
--			      "adding home directory", user_name, user_id, 1);
--#endif
--	}
-+  if (!rflg) { /* for system accounts defaults are ignored and we
-+		    * do not create a home dir -- gafton */
-+		if (access (user_home, F_OK)) {
-+			/* XXX - create missing parent directories.  --marekm */
-+			if (mkdir (user_home, 0)) {
-+				fprintf (stderr,
-+					 _
-+				 	("%s: cannot create directory %s\n"),
-+				 	Prog, user_home);
-+				fail_exit (E_HOMEDIR);
-+			}
-+			chown (user_home, user_id, user_gid);
-+			chmod (user_home,
-+			       0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
-+			home_added++;
-+  #ifdef WITH_AUDIT
-+			audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
-+  			      "adding home directory", user_name, user_id, 1);
-+  #endif
-+		}
-+  }
++    if (!rflg) { /* for system accounts defaults are ignored and we
++		  * do not create a home dir -- gafton */
+ 	if (access (user_home, F_OK)) {
+ 		/* XXX - create missing parent directories.  --marekm */
+ 		if (mkdir (user_home, 0)) {
+@@ -1593,6 +1614,7 @@
+ 			      "adding home directory", user_name, user_id, 1);
+ #endif
+ 	}
++    }
  }
  
  /*




More information about the Pkg-shadow-commits mailing list