components/desktop/xscreensaver/patches/27-bug-22706313.patch
changeset 5561 0416d82f7f55
parent 5560 61114c4b4667
child 5562 880dc66054d5
equal deleted inserted replaced
5560:61114c4b4667 5561:0416d82f7f55
     1 Bug 22706313 - xscreensaver calls to pam_setcred with the wrong flag
       
     2 
       
     3 Need to resync with current upstream release before submitting upstream.
       
     4 
       
     5 diff --git a/driver/passwd-pam.c b/driver/passwd-pam.c
       
     6 index 46f1347..607f214 100644
       
     7 --- a/driver/passwd-pam.c
       
     8 +++ b/driver/passwd-pam.c
       
     9 @@ -549,13 +549,18 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
       
    10        /* Each time we successfully authenticate, refresh credentials,
       
    11           for Kerberos/AFS/DCE/etc.  If this fails, just ignore that
       
    12           failure and blunder along; it shouldn't matter.
       
    13 -
       
    14 +      */
       
    15 +#ifdef __linux__
       
    16 +      /*
       
    17           Note: this used to be PAM_REFRESH_CRED instead of
       
    18           PAM_REINITIALIZE_CRED, but Jason Heiss <[email protected]>
       
    19           says that the Linux PAM library ignores that one, and only refreshes
       
    20           credentials when using PAM_REINITIALIZE_CRED.
       
    21         */
       
    22        setcred_rc = pam_setcred (pamh, PAM_REINITIALIZE_CRED);
       
    23 +#else
       
    24 +      setcred_rc = pam_setcred (pamh, PAM_REFRESH_CRED);
       
    25 +#endif
       
    26        if (verbose_p)
       
    27          fprintf (stderr, "%s:   pam_setcred (...) ==> %d (%s)\n",
       
    28                   blurb(), setcred_rc, PAM_STRERROR(pamh, setcred_rc));