From 35cd801647c667cdc4a063a05a47193d7d007db8 Mon Sep 17 00:00:00 2001 From: Ondrej Vasik Date: Thu, 18 Nov 2010 17:28:56 +0100 Subject: [PATCH] don't prompt for password with runuser(#654367) --- coreutils-8.7-runuser.patch | 13 +++++++++---- coreutils.spec | 7 +++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/coreutils-8.7-runuser.patch b/coreutils-8.7-runuser.patch index 6692a3e..93cd962 100644 --- a/coreutils-8.7-runuser.patch +++ b/coreutils-8.7-runuser.patch @@ -138,7 +138,7 @@ diff -urNp coreutils-8.7-orig/src/su.c coreutils-8.7/src/su.c {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} -@@ -444,8 +457,14 @@ correct_password (const struct passwd *p +@@ -444,6 +457,11 @@ correct_password (const struct passwd *p retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name); PAM_BAIL_P (return false); } @@ -149,10 +149,15 @@ diff -urNp coreutils-8.7-orig/src/su.c coreutils-8.7/src/su.c +#else retval = pam_authenticate (pamh, 0); PAM_BAIL_P (return false); -+#endif retval = pam_acct_mgmt (pamh, 0); - if (retval == PAM_NEW_AUTHTOK_REQD) - { +@@ -454,6 +472,7 @@ correct_password (const struct passwd *p + PAM_BAIL_P (return false); + } + PAM_BAIL_P (return false); ++#endif + /* Must be authenticated if this point was reached. */ + return true; + #else /* !USE_PAM */ @@ -533,11 +552,22 @@ modify_environment (const struct passwd /* Become the user and group(s) specified by PW. */ diff --git a/coreutils.spec b/coreutils.spec index 26c2b0d..266afc5 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.7 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -332,7 +332,10 @@ fi %{_libdir}/coreutils %changelog -* Wed Nov 03 2010 Ondrej Vasik - 8.7-1 +* Thu Nov 18 2010 Ondrej Vasik - 8.7-2 +- don't prompt for password with runuser(#654367) + +* Mon Nov 15 2010 Ondrej Vasik - 8.7-1 - new upstream release coreutils-8.7 - pam support in su consolidation with SUSE(#622700)