Changeset 102 in openpam


Ignore:
Timestamp:
Apr 6, 2002, 5:41:37 PM (16 years ago)
Author:
Dag-Erling Smørgrav
Message:

Check flags carefully, and add documentation.

Sponsored by: DARPA, NAI Labs

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pam_authenticate.c

    r93 r102  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/pam_authenticate.c#8 $
     34 * $P4: //depot/projects/openpam/lib/pam_authenticate.c#9 $
    3535 */
    3636
     
    5454        int pam_err;
    5555
     56        if (flags & ~(PAM_SILENT|PAM_DISALLOW_NULL_AUTHTOK))
     57                return (PAM_SYMBOL_ERR);
    5658        pam_err = openpam_dispatch(pamh, PAM_SM_AUTHENTICATE, flags);
    5759        pam_set_item(pamh, PAM_AUTHTOK, NULL);
     
    6668 *      !PAM_IGNORE
    6769 */
     70
     71/**
     72 * The =pam_authenticate function attempts to authenticate the user
     73 * associated with the pam context specified by the =pamh argument.
     74 *
     75 * The application is free to call =pam_authenticate as many times as it
     76 * wishes, but some modules may maintain an internal retry counter and
     77 * return =PAM_MAXTRIES when it exceeds some preset or hardcoded limit.
     78 *
     79 * The =flags argument is the binary or of zero or more of the following
     80 * values:
     81 *
     82 *      =PAM_SILENT
     83 *              Do not emit any messages.
     84 *      =PAM_DISALLOW_NULL_AUTHTOK
     85 *              Fail if the user's authentication token is null.
     86 */
  • trunk/lib/pam_chauthtok.c

    r93 r102  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/pam_chauthtok.c#9 $
     34 * $P4: //depot/projects/openpam/lib/pam_chauthtok.c#10 $
    3535 */
    3636
     
    5454        int pam_err;
    5555
    56         if (flags & PAM_PRELIM_CHECK || flags & PAM_UPDATE_AUTHTOK)
     56        if (flags & ~(PAM_SILENT|PAM_CHANGE_EXPIRED_AUTHTOK))
    5757                return (PAM_SYMBOL_ERR);
    5858        pam_err = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK,
     
    7474 *      PAM_SYMBOL_ERR
    7575 */
     76
     77/**
     78 * The =pam_chauthtok function attempts to change the authentication token
     79 * for the user associated with the pam context specified by the =pamh
     80 * argument.
     81 *
     82 * The =flags argument is the binary or of zero or more of the following
     83 * values:
     84 *
     85 *      =PAM_SILENT
     86 *              Do not emit any messages.
     87 *      =PAM_CHANGE_EXPIRED_AUTHTOK
     88 *              Change only those authentication tokens that have expired.
     89 */
Note: See TracChangeset for help on using the changeset viewer.