From 839e47c5a62fb42d3e0b2e083ad23243e9cec566 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sun, 10 May 1998 06:20:27 +0000 Subject: Updated OSF1_ENH_SEC mode password handling. This now tries Enhanced passwords first and if this fails trys Basic mode (ie: Unix /etc/passwd) authentication. This only happens when OSF1_ENH_SEC is defined at compilation. (This used to be commit 29462c8d7a241eb462b1583170a0b5f16096ea3f) --- source3/smbd/password.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 82e3a024e1..8dfae21ad1 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -940,7 +940,14 @@ Hence we make a direct return to avoid a second chance!!! #endif #ifdef OSF1_ENH_SEC - return(strcmp(osf1_bigcrypt(password,this_salt),this_crypted) == 0); + { + BOOL ret = (strcmp(osf1_bigcrypt(password,this_salt),this_crypted) == 0); + if(!ret) { + DEBUG(2,("password_check: OSF1_ENH_SEC failed. Trying normal crypt.\n")); + ret = (strcmp((char *)crypt(password,this_salt),this_crypted) == 0); + } + return ret; + } #endif #ifdef ULTRIX_AUTH -- cgit