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

Nicolas FRANCOIS pkg-shadow-devel@lists.alioth.debian.org
Wed, 29 Jun 2005 19:20:13 +0000


Author: nekral-guest
Date: 2005-06-29 19:20:12 +0000 (Wed, 29 Jun 2005)
New Revision: 316

Added:
   trunk/debian/patches/431_su_uid_0_not_root
Removed:
   trunk/debian/patches/008_su_uid_0_not_root
Modified:
   trunk/debian/patches/series
Log:
This patch may require some tuning before being accepted upstream.
(see the discussion on pkg-shadow-devel)
It has to be kept.


Deleted: trunk/debian/patches/008_su_uid_0_not_root
===================================================================
--- trunk/debian/patches/008_su_uid_0_not_root	2005-06-29 19:18:05 UTC (rev 315)
+++ trunk/debian/patches/008_su_uid_0_not_root	2005-06-29 19:20:12 UTC (rev 316)
@@ -1,28 +0,0 @@
-Goal: don't assume uid 0 == "root", use getpwuid to fetch it
-Fixes: #81924
-
-Status wrt upstream: It was submitted upstream upstream (3 Jun 2005).
-                     Some modification may be needed before its inclusion
-                     upstream (multiple uid 0 accounts).
-http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2005-June/001287.html
-
-Index: shadow-4.0.3/src/su.c
-===================================================================
---- shadow-4.0.3.orig/src/su.c	2005-05-30 23:07:20.196974000 +0200
-+++ shadow-4.0.3/src/su.c	2005-05-30 23:13:57.716974000 +0200
-@@ -270,7 +270,14 @@
- 		argv++;		/* shift ... */
- 	}
- 	if (!name[0])		/* use default user ID */
--		(void) strcpy (name, "root");
-+	{
-+		struct passwd *root_pw = getpwuid(0);
-+		if (root_pw == NULL) {
-+			SYSLOG((LOG_CRIT, "There is no UID 0 user."));
-+			su_failure(tty)
-+		}
-+		strcpy(name, root_pw->pw_name);
-+	}
- 
- 	doshell = argc == 0;	/* any arguments remaining? */
- 

Copied: trunk/debian/patches/431_su_uid_0_not_root (from rev 310, trunk/debian/patches/008_su_uid_0_not_root)

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2005-06-29 19:18:05 UTC (rev 315)
+++ trunk/debian/patches/series	2005-06-29 19:20:12 UTC (rev 316)
@@ -22,7 +22,7 @@
 351_libmisc_failure_UTMPX
 006_libmisc_chowntty_ro_root_fs
 008_su_addenv_HOME_and_SHELL
-008_su_uid_0_not_root
+431_su_uid_0_not_root
 008_su_add_GNU_options
 430_su_ignore_SIGINT
 008_su_check_user_earlier