Changeset 68 in openpam


Ignore:
Timestamp:
Feb 20, 2002, 3:22:09 PM (17 years ago)
Author:
Dag-Erling Smørgrav
Message:

Allow the PAM_AUTHTOK_PROMPT item to override the prompt specified by
the module.

Sponsored by: DARPA, NAI Labs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pam_get_authtok.c

    r63 r68  
    6262        if (r == PAM_SUCCESS && *authtok != NULL)
    6363                return (PAM_SUCCESS);
    64         if (prompt == NULL) {
    65                 if (pam_get_item(pamh, PAM_AUTHTOK_PROMPT,
    66                     (const void **)&p) != PAM_SUCCESS || p == NULL)
     64        if (pam_get_item(pamh, PAM_AUTHTOK_PROMPT,
     65            (const void **)&p) != PAM_SUCCESS || p == NULL)
     66                if (prompt == NULL)
    6767                        prompt = "Password:";
    68         }
    6968        r = pam_prompt(pamh, PAM_PROMPT_ECHO_OFF, &resp,
    70             "%s", prompt ? prompt : p);
     69            "%s", p ? p : prompt);
    7170        if (r != PAM_SUCCESS)
    7271                return (r);
Note: See TracChangeset for help on using the changeset viewer.