summaryrefslogtreecommitdiff
path: root/modules/pam_unix/support.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_unix/support.c')
-rw-r--r--modules/pam_unix/support.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c
index b695b8db..e2a30646 100644
--- a/modules/pam_unix/support.c
+++ b/modules/pam_unix/support.c
@@ -689,7 +689,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
D(("user has empty password - access denied"));
retval = PAM_AUTH_ERR;
}
- } else if (!p || (*salt == '*') || (salt_len < 13)) {
+ } else if (!p || (*salt == '*')) {
retval = PAM_AUTH_ERR;
} else {
if (!strncmp(salt, "$1$", 3)) {
@@ -698,6 +698,12 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
_pam_delete(pp);
pp = Brokencrypt_md5(p, salt);
}
+ } else if (*salt == '$') {
+ /*
+ * Ok, we don't know the crypt algorithm, but maybe
+ * libcrypt nows about it? We should try it.
+ */
+ pp = x_strdup (crypt(p, salt));
} else {
pp = bigcrypt(p, salt);
}