[Pkg-shadow-commits] r1030 - in trunk/debian: . patches

Christian Perrier bubulle at costa.debian.org
Thu Jun 22 17:47:58 UTC 2006


Author: bubulle
Date: 2006-06-22 17:47:57 +0000 (Thu, 22 Jun 2006)
New Revision: 1030

Added:
   trunk/debian/patches/301_useradd-374705
Modified:
   trunk/debian/changelog
   trunk/debian/patches/series
Log:
Fix for #374705 (fixed upstream, but who knows what can happen?)


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-06-20 06:36:24 UTC (rev 1029)
+++ trunk/debian/changelog	2006-06-22 17:47:57 UTC (rev 1030)
@@ -10,6 +10,9 @@
       spotting that one and proposing a fix. Closes: #374457
   * Debconf translation updates:
     - Lituanian translation updated. Closes: #374313
+  * Upstream bugs fixed upstream:
+    - debian/patches/301_useradd-374705: stop creating incorrect
+      mail spool files during user creation. Closes: #374705
 
  -- Christian Perrier <bubulle at debian.org>  Sat, 10 Jun 2006 19:04:48 +0200
 

Added: trunk/debian/patches/301_useradd-374705
===================================================================
--- trunk/debian/patches/301_useradd-374705	2006-06-20 06:36:24 UTC (rev 1029)
+++ trunk/debian/patches/301_useradd-374705	2006-06-22 17:47:57 UTC (rev 1030)
@@ -0,0 +1,68 @@
+Goal: Fix the user's mail spool creation
+
+Fixes: #374705
+
+Status vs upstream: Applied for 4.0.17
+
+Index: shadow-4.0.16/src/useradd.c
+===================================================================
+--- shadow-4.0.16.orig/src/useradd.c	2006-06-22 19:44:51.048856000 +0200
++++ shadow-4.0.16/src/useradd.c	2006-06-22 19:45:08.489946000 +0200
+@@ -1247,6 +1247,11 @@
+ 			audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "adding user",
+ 				      user_name, -1, 0);
+ #endif
++
++	/* TODO: add handle change default spool mail creation by 
++	   -K CREATE_MAIL_SPOOL={yes,no}. It need rewrite internal API for handle
++	   shadow tools configuration */
++	create_mail_spool = def_create_mail_spool;
+ 			exit (E_BAD_ARG);
+ 		}
+ 		if (!dflg) {
+@@ -1600,6 +1605,7 @@
+   }
+ }
+ 
++		}
+ /*
+  * create_mail - create the user's mail spool
+  *
+@@ -1624,23 +1630,22 @@
+ 			perror (_("Creating mailbox file"));
+ 			return;
+ 
+-			gr = getgrnam ("mail");
+-			if (!gr) {
+-				fprintf (stderr,
+-					 _
+-					 ("Group 'mail' not found. Creating the user mailbox file with 0600 mode.\n"));
+-				gid = user_gid;
+-				mode = 0600;
+-			} else {
+-				gid = gr->gr_gid;
+-				mode = 0660;
+-			}
++		gr = getgrnam ("mail");
++		if (!gr) {
++			fprintf (stderr,
++				 _
++				 ("Group 'mail' not found. Creating the user mailbox file with 0600 mode.\n"));
++			gid = user_gid;
++			mode = 0600;
++		} else {
++			gid = gr->gr_gid;
++			mode = 0660;
++		}
+ 
+-			if (fchown (fd, user_id, gid) || fchmod (fd, mode))
+-				perror (_("Setting mailbox file permissions"));
++		if (fchown (fd, user_id, gid) || fchmod (fd, mode))
++			perror (_("Setting mailbox file permissions"));
+ 
+-			close (fd);
+-		}
++		close (fd);
+ 	}
+ }
+ 

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2006-06-20 06:36:24 UTC (rev 1029)
+++ trunk/debian/patches/series	2006-06-22 17:47:57 UTC (rev 1030)
@@ -34,3 +34,4 @@
 402-clarify_usermod_usage
 487_passwd_chauthtok_failed_message
 403_fix_PATH-MAX_hurd
+301_useradd-374705




More information about the Pkg-shadow-commits mailing list