components/sudo/patches/pam_setcred.patch
changeset 1790 5185544d0b6e
parent 1789 afea5ee094d1
child 1791 53d056cbdb63
equal deleted inserted replaced
1789:afea5ee094d1 1790:5185544d0b6e
     1 # Fix for
       
     2 # 17617070 sudo does not use pam_setcred correctly to set the audit context
       
     3 diff -ru sudo-1.8.6p7-orig//plugins/sudoers/auth/pam.c sudo-1.8.6p7/plugins/sudoers/auth/pam.c
       
     4 --- sudo-1.8.6p7-orig//plugins/sudoers/auth/pam.c	Mon Feb 25 11:42:44 2013
       
     5 +++ sudo-1.8.6p7/plugins/sudoers/auth/pam.c	Mon Oct 21 13:32:27 2013
       
     6 @@ -229,8 +229,10 @@
       
     7       * for the setcred module.  Because we haven't called pam_authenticate(),
       
     8       * this is not set and so pam_setcred() returns PAM_PERM_DENIED.
       
     9       * We can't call pam_acct_mgmt() with Linux-PAM for a similar reason.
       
    10 +     *
       
    11 +     * Reinitialize credentials when changing a user. 
       
    12       */
       
    13 -    (void) pam_setcred(pamh, PAM_ESTABLISH_CRED);
       
    14 +    (void) pam_setcred(pamh, PAM_REINITIALIZE_CRED);
       
    15  
       
    16  #ifdef HAVE_PAM_GETENVLIST
       
    17      /*