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

Christian Perrier bubulle at costa.debian.org
Tue Jan 3 07:11:00 UTC 2006


Author: bubulle
Date: 2006-01-03 07:10:58 +0000 (Tue, 03 Jan 2006)
New Revision: 748

Removed:
   trunk/debian/patches/471_su_simplify_option_preserve_environment
Modified:
   trunk/debian/patches/series
Log:
Patch has been applied upstream

Deleted: trunk/debian/patches/471_su_simplify_option_preserve_environment
===================================================================
--- trunk/debian/patches/471_su_simplify_option_preserve_environment	2006-01-03 07:09:24 UTC (rev 747)
+++ trunk/debian/patches/471_su_simplify_option_preserve_environment	2006-01-03 07:10:58 UTC (rev 748)
@@ -1,54 +0,0 @@
-Index: shadow-4.0.14/src/su.c
-===================================================================
---- shadow-4.0.14.orig/src/su.c	2005-12-14 22:18:39.000000000 +0100
-+++ shadow-4.0.14/src/su.c	2005-12-14 22:25:39.000000000 +0100
-@@ -379,6 +379,10 @@
- 				break;
- 			case 'm':
- 			case 'p':
-+				/* This will only have an effect if the target
-+				 * user do not have a restricted shell, or if
-+				 * su is called by root.
-+				 */
- 				change_environment = 0;
- 				break;
- 			case 's':
-@@ -510,14 +514,18 @@
- #endif				/* !USE_PAM */
- 	pwent = *pw;
- 
-+	/* If su is not called by root, and the target user has a restricted
-+	 * shell, the environment must be changed.
-+	 */
-+	change_environment |= (restricted_shell(pwent.pw_shell) && !amroot);
-+
- 	/*
- 	 * If a new login is being set up, the old environment will be
- 	 * ignored and a new one created later on.
- 	 * (note: in the case of a subsystem, the shell will be restricted,
- 	 *        and this won't be executed on the first pass)
- 	 */
--	if (fakelogin &&
--	    (change_environment || restricted_shell (pwent.pw_shell))) {
-+	if (fakelogin && change_environment) {
- 		/*
- 		 * The terminal type will be left alone if it is present in
- 		 * the environment already.
-@@ -785,7 +793,7 @@
- 		exit (1);
- 	}
- 
--	if (change_environment || restricted_shell (pwent.pw_shell)) {
-+	if (change_environment) {
- 		/* we need to setup the environment *after* pam_open_session(),
- 		 * else the UID is changed before stuff like pam_xauth could
- 		 * run, and we cannot access /etc/shadow and co
-@@ -817,7 +825,7 @@
- 		exit (1);
- #endif				/* !USE_PAM */
- 
--	if (change_environment || restricted_shell (pwent.pw_shell)) {
-+	if (change_environment) {
- 		if (fakelogin)
- 			setup_env (&pwent);
- 		else {

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2006-01-03 07:09:24 UTC (rev 747)
+++ trunk/debian/patches/series	2006-01-03 07:10:58 UTC (rev 748)
@@ -41,7 +41,6 @@
 468_duplicate_passwd_struct_before_usage
 502_fix_generated_man_pages
 470_su.1_document_options
-471_su_simplify_option_preserve_environment
 472_su_exported_variables
 473_su_fix_comments
 474_useradd_fix_comments




More information about the Pkg-shadow-commits mailing list