diff options
Diffstat (limited to 'modules/pam_unix/pam_unix.c')
-rw-r--r-- | modules/pam_unix/pam_unix.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/pam_unix/pam_unix.c b/modules/pam_unix/pam_unix.c index fd0ce59..b750712 100644 --- a/modules/pam_unix/pam_unix.c +++ b/modules/pam_unix/pam_unix.c @@ -32,6 +32,7 @@ #include <security/pam_mod_misc.h> +extern char * MD5String (char *) ; /* * Helper functions for internal use */ @@ -351,12 +352,13 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, !openpam_get_option(pamh, PAM_OPT_NULLOK)) return (PAM_PERM_DENIED); - makesalt(salt); /* Update shadow/passwd entries for Linux */ if ( openpam_get_option (pamh, PAM_OPT_MD5) ) - PAM_ERROR("MD5 not supported yet. Using standar crypt..."); - - pam_err = update_shadow( pamh ,user,crypt(new_pass, salt)); + pam_err = update_shadow( pamh ,user, MD5String(new_pass)) ; + else { + makesalt(salt); + pam_err = update_shadow( pamh ,user,crypt(new_pass, salt)); + } if ( pam_err != PAM_SUCCESS) return (pam_err); |