[pam_krb5/f15/master] - backport the change to prefer krb5_change_password() over krb5_set_password() again from 2.3.12

Nalin Dahyabhai nalin at fedoraproject.org
Thu Mar 24 16:55:00 UTC 2011


commit 575d63f064e0d3797d1b2d13c5562e842cf15228
Author: Nalin Dahyabhai <nalin at redhat.com>
Date:   Thu Mar 24 12:54:48 2011 -0400

    - backport the change to prefer krb5_change_password() over krb5_set_password()
      again from 2.3.12 (#676526)

 pam_krb5-2.3.11-cpw.patch |   47 +++++++++++++++++++++++++++++++++++++++++++++
 pam_krb5.spec             |    8 ++++++-
 2 files changed, 54 insertions(+), 1 deletions(-)
---
diff --git a/pam_krb5-2.3.11-cpw.patch b/pam_krb5-2.3.11-cpw.patch
new file mode 100644
index 0000000..583be12
--- /dev/null
+++ b/pam_krb5-2.3.11-cpw.patch
@@ -0,0 +1,47 @@
+Backport change to switch preference back to krb5_change_password() from
+krb5_set_password(), which would only work against kadmin from krb5 1.7
+or later. #676526
+
+diff --git a/src/v5.c b/src/v5.c
+index b3e4fcf..216c905 100644
+--- a/src/v5.c
++++ b/src/v5.c
+@@ -1884,28 +1884,30 @@ v5_cc_retrieve_match(void)
+ #endif
+ }
+ 
+-#ifdef HAVE_KRB5_SET_PASSWORD
++#if defined(HAVE_KRB5_CHANGE_PASSWORD)
+ int
+ v5_change_password(krb5_context ctx, krb5_creds *creds, char *password,
+ 		   int *result_code,
+ 		   krb5_data *result_code_string,
+ 		   krb5_data *result_string)
+ {
+-	return krb5_set_password(ctx, creds, password, creds->client,
+-				 result_code,
+-				 result_code_string, result_string);
++	return krb5_change_password(ctx, creds, password,
++				    result_code,
++				    result_code_string, result_string);
+ }
+-#else
++#elif defined(HAVE_KRB5_SET_PASSWORD)
+ int
+ v5_change_password(krb5_context ctx, krb5_creds *creds, char *password,
+ 		   int *result_code,
+ 		   krb5_data *result_code_string,
+ 		   krb5_data *result_string)
+ {
+-	return krb5_change_password(ctx, creds, password,
+-				    result_code,
+-				    result_code_string, result_string);
++	return krb5_set_password(ctx, creds, password, creds->client,
++				 result_code,
++				 result_code_string, result_string);
+ }
++#else
++#error "Don't know how to change passwords!"
+ #endif
+ 
+ int
diff --git a/pam_krb5.spec b/pam_krb5.spec
index 4dc49ec..b609ecf 100644
--- a/pam_krb5.spec
+++ b/pam_krb5.spec
@@ -1,9 +1,10 @@
 Summary: A Pluggable Authentication Module for Kerberos 5
 Name: pam_krb5
 Version: 2.3.11
-Release: 3%{?dist}
+Release: 4%{?dist}
 Source0: https://fedorahosted.org/released/pam_krb5/pam_krb5-%{version}-1.tar.gz
 License: BSD or LGPLv2+
+Patch0: pam_krb5-2.3.11-cpw.patch
 Group: System Environment/Base
 URL: https://fedorahosted.org/pam_krb5/
 BuildRequires: keyutils-libs-devel, krb5-devel, pam-devel
@@ -16,6 +17,7 @@ The included pam_krb5afs module also gets AFS tokens if so configured.
 
 %prep
 %setup -q -n pam_krb5-%{version}-1
+%patch0 -p1 -b .cpw
 
 %build
 %configure --libdir=/%{_lib} \
@@ -45,6 +47,10 @@ sed -ri -e 's|/lib(64)?/|/\$LIB/|g' $RPM_BUILD_ROOT/%{_mandir}/man*/pam_krb5*.8*
 %{_mandir}/man8/*
 
 %changelog
+* Thu Mar 24 2011 Nalin Dahyabhai <nalin at redhat.com> - 2.3.11-4
+- backport the change to prefer krb5_change_password() over krb5_set_password()
+  again from 2.3.12 (#676526)
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.3.11-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list