Changeset 81 in openpam for trunk/lib/pam_chauthtok.c


Ignore:
Timestamp:
Feb 23, 2002, 6:06:45 PM (18 years ago)
Author:
Dag-Erling Smørgrav
Message:
  • pam_sm_chauthtok() can return PAM_TRY_AGAIN.
  • "sufficient" should not terminate the chain if the PAM_PRELIM_CHECK flag is set.

Sponsored by: DARPA, NAI Labs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pam_chauthtok.c

    r63 r81  
    5252        int flags)
    5353{
     54        int pam_err;
    5455
    55         return (openpam_dispatch(pamh, PAM_SM_CHAUTHTOK, flags));
     56        if (flags & PAM_PRELIM_CHECK || flags & PAM_UPDATE_AUTHTOK)
     57                return (PAM_SYMBOL_ERR);
     58        pam_err = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK,
     59            flags | PAM_PRELIM_CHECK);
     60        if (pam_err == PAM_SUCCESS)
     61                pam_err = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK,
     62                    flags | PAM_UPDATE_AUTHTOK);
     63        pam_set_item(pamh, PAM_OLDAUTHTOK, NULL);
     64        pam_set_item(pamh, PAM_AUTHTOK, NULL);
     65        return (pam_err);
    5666}
    5767
     
    6272 *      =pam_sm_chauthtok
    6373 *      !PAM_IGNORE
     74 *      PAM_SYMBOL_ERR
    6475 */
Note: See TracChangeset for help on using the changeset viewer.