summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>1998-05-10 06:20:27 +0000
committerJohn Terpstra <jht@samba.org>1998-05-10 06:20:27 +0000
commit839e47c5a62fb42d3e0b2e083ad23243e9cec566 (patch)
tree06c80333193d560db694f8b1a916b9cbbb348aff /source3
parent721814dd3e10a9f7ae3e6cd26bf5224f3fdcbd23 (diff)
downloadsamba-839e47c5a62fb42d3e0b2e083ad23243e9cec566.tar.gz
samba-839e47c5a62fb42d3e0b2e083ad23243e9cec566.tar.bz2
samba-839e47c5a62fb42d3e0b2e083ad23243e9cec566.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/password.c9
1 files changed, 8 insertions, 1 deletions
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