diff options
author | Timo Weingärtner <timo@tiwe.de> | 2021-04-16 19:33:21 +0200 |
---|---|---|
committer | Timo Weingärtner <timo@tiwe.de> | 2021-04-16 19:49:10 +0200 |
commit | f46bd38f387f0a580e134388086321b03e6b17d3 (patch) | |
tree | cf8f36be26226fb0f039f9478ab851ec7c89458e /pam_pwdfile.c | |
parent | e29d26e77d8577ea272211c20240b3c39dff6bf0 (diff) | |
download | libpam-pwdfile-f46bd38f387f0a580e134388086321b03e6b17d3.tar.gz |
do away with legacy crypt types
it is the responsibility of libcrypt to implement crypt types
Diffstat (limited to 'pam_pwdfile.c')
-rw-r--r-- | pam_pwdfile.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/pam_pwdfile.c b/pam_pwdfile.c index bebbeea..1ea4a06 100644 --- a/pam_pwdfile.c +++ b/pam_pwdfile.c @@ -68,9 +68,6 @@ #include <security/pam_modules.h> #include <security/pam_ext.h> -#include "md5.h" -#include "bigcrypt.h" - static int lock_fd(int fd) { int delay; @@ -101,7 +98,6 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, FILE *pwdfile; int use_flock = 0; int use_delay = 1; - int legacy_crypt = 0; int debug = 0; char * linebuf = NULL; size_t linebuflen; @@ -123,8 +119,6 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, use_delay = 0; else if (!strcmp(argv[i], "debug")) debug = 1; - else if (!strcmp(argv[i], "legacy_crypt")) - legacy_crypt = 1; } #ifdef HAVE_PAM_FAIL_DELAY @@ -211,13 +205,6 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, return PAM_AUTH_ERR; } - if (legacy_crypt && strcmp(crypted_password, stored_crypted_password)) { - if (!strncmp(stored_crypted_password, "$1$", 3)) - crypted_password = Brokencrypt_md5(password, stored_crypted_password); - else - crypted_password = bigcrypt(password, stored_crypted_password); - } - if (strcmp(crypted_password, stored_crypted_password)) { pam_syslog(pamh, LOG_NOTICE, "wrong password for user %s", name); free(linebuf); |