diff options
author | des <des@FreeBSD.org> | 2002-03-05 13:49:56 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-03-05 13:49:56 +0000 |
commit | 5800a4708c3a4b21e332961b390d4459fd673568 (patch) | |
tree | 1435317b57611a50e1b3cf878a8256c67e69f519 /contrib/openpam/lib/pam_chauthtok.c | |
parent | b7924daede5918d4af38aea32dcfe788509d2326 (diff) | |
download | FreeBSD-src-5800a4708c3a4b21e332961b390d4459fd673568.zip FreeBSD-src-5800a4708c3a4b21e332961b390d4459fd673568.tar.gz |
Vendor import of OpenPAM Celandine.
Diffstat (limited to 'contrib/openpam/lib/pam_chauthtok.c')
-rw-r--r-- | contrib/openpam/lib/pam_chauthtok.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/contrib/openpam/lib/pam_chauthtok.c b/contrib/openpam/lib/pam_chauthtok.c index 3248feb..0d4189b 100644 --- a/contrib/openpam/lib/pam_chauthtok.c +++ b/contrib/openpam/lib/pam_chauthtok.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $P4: //depot/projects/openpam/lib/pam_chauthtok.c#8 $ */ #include <sys/param.h> @@ -51,8 +51,18 @@ int pam_chauthtok(pam_handle_t *pamh, int flags) { + int pam_err; - return (openpam_dispatch(pamh, PAM_SM_CHAUTHTOK, flags)); + if (flags & PAM_PRELIM_CHECK || flags & PAM_UPDATE_AUTHTOK) + return (PAM_SYMBOL_ERR); + pam_err = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK, + flags | PAM_PRELIM_CHECK); + if (pam_err == PAM_SUCCESS) + pam_err = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK, + flags | PAM_UPDATE_AUTHTOK); + pam_set_item(pamh, PAM_OLDAUTHTOK, NULL); + pam_set_item(pamh, PAM_AUTHTOK, NULL); + return (pam_err); } /* @@ -61,4 +71,5 @@ pam_chauthtok(pam_handle_t *pamh, * =openpam_dispatch * =pam_sm_chauthtok * !PAM_IGNORE + * PAM_SYMBOL_ERR */ |