22706313 xscreensaver calls to pam_setcred with the wrong flag
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Wed, 17 Feb 2016 22:18:42 -0800
changeset 5474 5f7ca7eaf283
parent 5473 b43979b0c196
child 5475 8ed6e5dc51bc
22706313 xscreensaver calls to pam_setcred with the wrong flag
components/desktop/xscreensaver/patches/27-bug-22706313.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/xscreensaver/patches/27-bug-22706313.patch	Wed Feb 17 22:18:42 2016 -0800
@@ -0,0 +1,28 @@
+Bug 22706313 - xscreensaver calls to pam_setcred with the wrong flag
+
+Need to resync with current upstream release before submitting upstream.
+
+diff --git a/driver/passwd-pam.c b/driver/passwd-pam.c
+index 46f1347..607f214 100644
+--- a/driver/passwd-pam.c
++++ b/driver/passwd-pam.c
+@@ -549,13 +549,18 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
+       /* Each time we successfully authenticate, refresh credentials,
+          for Kerberos/AFS/DCE/etc.  If this fails, just ignore that
+          failure and blunder along; it shouldn't matter.
+-
++      */
++#ifdef __linux__
++      /*
+          Note: this used to be PAM_REFRESH_CRED instead of
+          PAM_REINITIALIZE_CRED, but Jason Heiss <[email protected]>
+          says that the Linux PAM library ignores that one, and only refreshes
+          credentials when using PAM_REINITIALIZE_CRED.
+        */
+       setcred_rc = pam_setcred (pamh, PAM_REINITIALIZE_CRED);
++#else
++      setcred_rc = pam_setcred (pamh, PAM_REFRESH_CRED);
++#endif
+       if (verbose_p)
+         fprintf (stderr, "%s:   pam_setcred (...) ==> %d (%s)\n",
+                  blurb(), setcred_rc, PAM_STRERROR(pamh, setcred_rc));