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

Nicolas FRANCOIS pkg-shadow-devel@lists.alioth.debian.org
Thu, 09 Jun 2005 21:49:05 +0000


Author: nekral-guest
Date: 2005-06-09 21:49:05 +0000 (Thu, 09 Jun 2005)
New Revision: 226

Added:
   trunk/debian/patches/347_login_log_pam_user_if_USE_PAM
   trunk/debian/patches/348_login_PAM_SILENT_if_hushed_login
   trunk/debian/patches/349_login_opt-f_with_username_after--
   trunk/debian/patches/350_su_syslog_old:new
Removed:
   trunk/debian/patches/008_login_PAM_SILENT_if_hushed_login
   trunk/debian/patches/008_login_log_pam_user_if_USE_PAM
   trunk/debian/patches/008_login_opt-f_with_username_after--
   trunk/debian/patches/008_su_syslog_old:new
Modified:
   trunk/debian/patches/series
Log:
Upstream applied some of the  008_{login,su}* patches.
Move them to 3xx.


Deleted: trunk/debian/patches/008_login_PAM_SILENT_if_hushed_login
===================================================================
--- trunk/debian/patches/008_login_PAM_SILENT_if_hushed_login	2005-06-09 21:41:47 UTC (rev 225)
+++ trunk/debian/patches/008_login_PAM_SILENT_if_hushed_login	2005-06-09 21:49:05 UTC (rev 226)
@@ -1,25 +0,0 @@
-Goal: check for hushed login and pass PAM_SILENT if true,
-Fixes: #48002
-
-Status wrt upstream: It should be forwarded to upstream.
-
-Index: shadow-4.0.3/src/login.c
-===================================================================
---- shadow-4.0.3.orig/src/login.c	2005-05-28 22:21:29.434189000 +0200
-+++ shadow-4.0.3/src/login.c	2005-05-28 22:21:32.774189000 +0200
-@@ -889,11 +889,14 @@
- 
- 		if (!pwd || setup_groups (pwd))
- 			exit (1);
-+		else
-+		        pwent = *pwd;
- 
- 		retcode = pam_setcred (pamh, PAM_ESTABLISH_CRED);
- 		PAM_FAIL_CHECK;
- 
--		retcode = pam_open_session (pamh, 0);
-+		retcode = pam_open_session (pamh,
-+					    hushed(&pwent) ? PAM_SILENT : 0);
- 		PAM_FAIL_CHECK;
- 
- #else				/* ! USE_PAM */

Deleted: trunk/debian/patches/008_login_log_pam_user_if_USE_PAM
===================================================================
--- trunk/debian/patches/008_login_log_pam_user_if_USE_PAM	2005-06-09 21:41:47 UTC (rev 225)
+++ trunk/debian/patches/008_login_log_pam_user_if_USE_PAM	2005-06-09 21:49:05 UTC (rev 226)
@@ -1,20 +0,0 @@
-Goal: fixed loggin of username on succesful login (was using
-      the normal username, when it should have used pam_user)
-Fixes: #47819
-Status wrt upstream: It should be forwarded to upstream.
-Index: shadow-4.0.3/src/login.c
-===================================================================
---- shadow-4.0.3.orig/src/login.c	2005-05-28 22:21:25.134189000 +0200
-+++ shadow-4.0.3/src/login.c	2005-05-28 22:21:29.434189000 +0200
-@@ -1421,7 +1421,11 @@
- 	if (pwent.pw_uid == 0)
- 		SYSLOG ((LOG_NOTICE, "ROOT LOGIN %s", fromhost));
- 	else if (getdef_bool ("LOG_OK_LOGINS"))
-+#ifdef USE_PAM
-+		SYSLOG ((LOG_INFO, "`%s' logged in %s", pam_user, fromhost));
-+#else
- 		SYSLOG ((LOG_INFO, "`%s' logged in %s", username, fromhost));
-+#endif
- 	closelog ();
- #ifdef RADIUS
- 	if (is_rad_login) {

Deleted: trunk/debian/patches/008_login_opt-f_with_username_after--
===================================================================
--- trunk/debian/patches/008_login_opt-f_with_username_after--	2005-06-09 21:41:47 UTC (rev 225)
+++ trunk/debian/patches/008_login_opt-f_with_username_after--	2005-06-09 21:49:05 UTC (rev 226)
@@ -1,48 +0,0 @@
-Goal: Made login's -f option also able to use the username after -- if none
-      was passed as it's optarg
-Fixes: #53702
-
-Status wrt upstream: I'm not sure, but it is probably not in upstream.
-                     It could certainly be submitted to upstream.
-
-Index: shadow-4.0.3/src/login.c
-===================================================================
---- shadow-4.0.3.orig/src/login.c	2005-05-23 01:17:08.437167000 +0200
-+++ shadow-4.0.3/src/login.c	2005-05-23 01:19:05.347167000 +0200
-@@ -473,7 +473,7 @@
- 
- 	check_flags (argc, argv);
- 
--	while ((flag = getopt (argc, argv, "d:f:h:pr:")) != EOF) {
-+	while ((flag = getopt (argc, argv, "d:f::h:pr:")) != EOF) {
- 		switch (flag) {
- 		case 'p':
- 			pflg++;
-@@ -482,11 +482,16 @@
- 			/*
- 			 * username must be a separate token
- 			 * (-f root, *not* -froot).  --marekm
-+ 			 *
-+ 			 * if -f has an arg, use that, else use the
-+ 			 * normal user name passed after all options
-+ 			 * --benc
- 			 */
--			if (optarg != argv[optind - 1])
-+			if (optarg != NULL && optarg != argv[optind - 1])
- 				usage ();
- 			fflg++;
--			STRFCPY (username, optarg);
-+			if (optarg)
-+			  STRFCPY (username, optarg);
- 			break;
- #ifdef	RLOGIN
- 		case 'r':
-@@ -640,7 +645,7 @@
- 		init_env ();
- 
- 		if (optind < argc) {	/* get the user name */
--			if (rflg || fflg)
-+			if (rflg || (fflg && username[0]))
- 				usage ();
- 
- #ifdef SVR4

Deleted: trunk/debian/patches/008_su_syslog_old:new
===================================================================
--- trunk/debian/patches/008_su_syslog_old:new	2005-06-09 21:41:47 UTC (rev 225)
+++ trunk/debian/patches/008_su_syslog_old:new	2005-06-09 21:49:05 UTC (rev 226)
@@ -1,29 +0,0 @@
-Goal: Fix su syslogs to be less ambiguous.  (old:new instead of old-new
-      because '-' can appear in usernames.)  Not clearer, mind you, but less
-      ambiguous.
-Fixes: #213592
-
-Status wrt upstream: It should be forwarded to upstream.
-
-Index: shadow-4.0.3/src/su.c
-===================================================================
---- shadow-4.0.3.orig/src/su.c	2005-05-29 12:11:25.560552000 +0200
-+++ shadow-4.0.3/src/su.c	2005-05-29 12:12:22.910552000 +0200
-@@ -228,7 +228,7 @@
- #ifdef USE_SYSLOG
- 	if (getdef_bool ("SYSLOG_SU_ENAB"))
- 		SYSLOG ((pwent.pw_uid ? LOG_INFO : LOG_NOTICE,
--			 "- %s %s-%s", tty,
-+			 "- %s %s:%s", tty,
- 			 oldname[0] ? oldname : "???",
- 			 name[0] ? name : "???"));
- 	closelog ();
-@@ -678,7 +678,7 @@
- #endif
- #ifdef USE_SYSLOG
- 	if (getdef_bool ("SYSLOG_SU_ENAB"))
--		SYSLOG ((LOG_INFO, "+ %s %s-%s", tty,
-+		SYSLOG ((LOG_INFO, "+ %s %s:%s", tty,
- 			 oldname[0] ? oldname : "???",
- 			 name[0] ? name : "???"));
- #endif

Copied: trunk/debian/patches/347_login_log_pam_user_if_USE_PAM (from rev 222, trunk/debian/patches/008_login_log_pam_user_if_USE_PAM)
===================================================================
--- trunk/debian/patches/008_login_log_pam_user_if_USE_PAM	2005-06-09 21:21:52 UTC (rev 222)
+++ trunk/debian/patches/347_login_log_pam_user_if_USE_PAM	2005-06-09 21:49:05 UTC (rev 226)
@@ -0,0 +1,22 @@
+Goal: fixed loggin of username on succesful login (was using
+      the normal username, when it should have used pam_user)
+Fixes: #47819
+
+Status wrt upstream: Applied upstream.
+
+Index: shadow-4.0.3/src/login.c
+===================================================================
+--- shadow-4.0.3.orig/src/login.c	2005-05-28 22:21:25.134189000 +0200
++++ shadow-4.0.3/src/login.c	2005-05-28 22:21:29.434189000 +0200
+@@ -1421,7 +1421,11 @@
+ 	if (pwent.pw_uid == 0)
+ 		SYSLOG ((LOG_NOTICE, "ROOT LOGIN %s", fromhost));
+ 	else if (getdef_bool ("LOG_OK_LOGINS"))
++#ifdef USE_PAM
++		SYSLOG ((LOG_INFO, "`%s' logged in %s", pam_user, fromhost));
++#else
+ 		SYSLOG ((LOG_INFO, "`%s' logged in %s", username, fromhost));
++#endif
+ 	closelog ();
+ #ifdef RADIUS
+ 	if (is_rad_login) {

Copied: trunk/debian/patches/348_login_PAM_SILENT_if_hushed_login (from rev 222, trunk/debian/patches/008_login_PAM_SILENT_if_hushed_login)
===================================================================
--- trunk/debian/patches/008_login_PAM_SILENT_if_hushed_login	2005-06-09 21:21:52 UTC (rev 222)
+++ trunk/debian/patches/348_login_PAM_SILENT_if_hushed_login	2005-06-09 21:49:05 UTC (rev 226)
@@ -0,0 +1,25 @@
+Goal: check for hushed login and pass PAM_SILENT if true,
+Fixes: #48002
+
+Status wrt upstream: Applied upstream.
+
+Index: shadow-4.0.3/src/login.c
+===================================================================
+--- shadow-4.0.3.orig/src/login.c	2005-05-28 22:21:29.434189000 +0200
++++ shadow-4.0.3/src/login.c	2005-05-28 22:21:32.774189000 +0200
+@@ -889,11 +889,14 @@
+ 
+ 		if (!pwd || setup_groups (pwd))
+ 			exit (1);
++		else
++		        pwent = *pwd;
+ 
+ 		retcode = pam_setcred (pamh, PAM_ESTABLISH_CRED);
+ 		PAM_FAIL_CHECK;
+ 
+-		retcode = pam_open_session (pamh, 0);
++		retcode = pam_open_session (pamh,
++					    hushed(&pwent) ? PAM_SILENT : 0);
+ 		PAM_FAIL_CHECK;
+ 
+ #else				/* ! USE_PAM */

Copied: trunk/debian/patches/349_login_opt-f_with_username_after-- (from rev 222, trunk/debian/patches/008_login_opt-f_with_username_after--)
===================================================================
--- trunk/debian/patches/008_login_opt-f_with_username_after--	2005-06-09 21:21:52 UTC (rev 222)
+++ trunk/debian/patches/349_login_opt-f_with_username_after--	2005-06-09 21:49:05 UTC (rev 226)
@@ -0,0 +1,47 @@
+Goal: Made login's -f option also able to use the username after -- if none
+      was passed as it's optarg
+Fixes: #53702
+
+Status wrt upstream: Applied upstream.
+
+Index: shadow-4.0.3/src/login.c
+===================================================================
+--- shadow-4.0.3.orig/src/login.c	2005-05-23 01:17:08.437167000 +0200
++++ shadow-4.0.3/src/login.c	2005-05-23 01:19:05.347167000 +0200
+@@ -473,7 +473,7 @@
+ 
+ 	check_flags (argc, argv);
+ 
+-	while ((flag = getopt (argc, argv, "d:f:h:pr:")) != EOF) {
++	while ((flag = getopt (argc, argv, "d:f::h:pr:")) != EOF) {
+ 		switch (flag) {
+ 		case 'p':
+ 			pflg++;
+@@ -482,11 +482,16 @@
+ 			/*
+ 			 * username must be a separate token
+ 			 * (-f root, *not* -froot).  --marekm
++ 			 *
++ 			 * if -f has an arg, use that, else use the
++ 			 * normal user name passed after all options
++ 			 * --benc
+ 			 */
+-			if (optarg != argv[optind - 1])
++			if (optarg != NULL && optarg != argv[optind - 1])
+ 				usage ();
+ 			fflg++;
+-			STRFCPY (username, optarg);
++			if (optarg)
++			  STRFCPY (username, optarg);
+ 			break;
+ #ifdef	RLOGIN
+ 		case 'r':
+@@ -640,7 +645,7 @@
+ 		init_env ();
+ 
+ 		if (optind < argc) {	/* get the user name */
+-			if (rflg || fflg)
++			if (rflg || (fflg && username[0]))
+ 				usage ();
+ 
+ #ifdef SVR4

Copied: trunk/debian/patches/350_su_syslog_old:new (from rev 222, trunk/debian/patches/008_su_syslog_old:new)
===================================================================
--- trunk/debian/patches/008_su_syslog_old:new	2005-06-09 21:21:52 UTC (rev 222)
+++ trunk/debian/patches/350_su_syslog_old:new	2005-06-09 21:49:05 UTC (rev 226)
@@ -0,0 +1,29 @@
+Goal: Fix su syslogs to be less ambiguous.  (old:new instead of old-new
+      because '-' can appear in usernames.)  Not clearer, mind you, but less
+      ambiguous.
+Fixes: #213592
+
+Status wrt upstream: Applied upstream.
+
+Index: shadow-4.0.3/src/su.c
+===================================================================
+--- shadow-4.0.3.orig/src/su.c	2005-05-29 12:11:25.560552000 +0200
++++ shadow-4.0.3/src/su.c	2005-05-29 12:12:22.910552000 +0200
+@@ -228,7 +228,7 @@
+ #ifdef USE_SYSLOG
+ 	if (getdef_bool ("SYSLOG_SU_ENAB"))
+ 		SYSLOG ((pwent.pw_uid ? LOG_INFO : LOG_NOTICE,
+-			 "- %s %s-%s", tty,
++			 "- %s %s:%s", tty,
+ 			 oldname[0] ? oldname : "???",
+ 			 name[0] ? name : "???"));
+ 	closelog ();
+@@ -678,7 +678,7 @@
+ #endif
+ #ifdef USE_SYSLOG
+ 	if (getdef_bool ("SYSLOG_SU_ENAB"))
+-		SYSLOG ((LOG_INFO, "+ %s %s-%s", tty,
++		SYSLOG ((LOG_INFO, "+ %s %s:%s", tty,
+ 			 oldname[0] ? oldname : "???",
+ 			 name[0] ? name : "???"));
+ #endif

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2005-06-09 21:41:47 UTC (rev 225)
+++ trunk/debian/patches/series	2005-06-09 21:49:05 UTC (rev 226)
@@ -28,18 +28,18 @@
 008_su_no_sanitize_env
 008_su_get_PAM_username
 008_su_PAM_session
-008_su_syslog_old:new
+350_su_syslog_old:new
 008_login_MAXHOSTNAMELEN
 008_grpck_add_prune_option
 008_login_stop_checking_args_after--
-008_login_opt-f_with_username_after--
+349_login_opt-f_with_username_after--
 008_login_more_LOG_UNKFAIL_ENAB
 008_login_log_failure_in_FTMP
 008_login_FAILLOG_ENAB
 008_login_cancel_timout_after_authentication
 008_login_close_session_as_root
-008_login_log_pam_user_if_USE_PAM
-008_login_PAM_SILENT_if_hushed_login
+347_login_log_pam_user_if_USE_PAM
+348_login_PAM_SILENT_if_hushed_login
 008_usermod_warn_old_home_not_removed
 008_userdel_remove_group_from_gshadow
 008_newgrp_preserve_env