summaryrefslogtreecommitdiffstats
path: root/source/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-20 21:11:55 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-20 21:11:55 +0000
commita25911d58c752350b62b205cfb0d6fc5b1c90cef (patch)
treee7711e3c8c6ddfc64ec5fcddf0c24458911c8c0c /source/smbd
parentb6c78d4c6fde2065678dd62bbd9dd4af9c5e805b (diff)
downloadsamba-a25911d58c752350b62b205cfb0d6fc5b1c90cef.tar.gz
samba-a25911d58c752350b62b205cfb0d6fc5b1c90cef.tar.xz
samba-a25911d58c752350b62b205cfb0d6fc5b1c90cef.zip
two fixes for NT clients -> share level Samba server
Diffstat (limited to 'source/smbd')
-rw-r--r--source/smbd/auth.c3
-rw-r--r--source/smbd/reply.c10
2 files changed, 11 insertions, 2 deletions
diff --git a/source/smbd/auth.c b/source/smbd/auth.c
index bbcf34e8ca9..cb0d54bf9b6 100644
--- a/source/smbd/auth.c
+++ b/source/smbd/auth.c
@@ -157,7 +157,8 @@ uint32 pass_check_smb_with_chal(char *user, char *domain, uchar chal[8],
memcpy(user_info.chal, chal, 8);
- if (lm_pwd_len >= 24 || (lp_encrypted_passwords() && (lm_pwd_len == 0) && lp_null_passwords())) {
+ if ((lm_pwd_len >= 24 || nt_pwd_len >= 24) ||
+ (lp_encrypted_passwords() && (lm_pwd_len == 0) && lp_null_passwords())) {
/* if 24 bytes long assume it is an encrypted password */
user_info.lm_resp.buffer = (uint8 *)lm_pwd;
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index ee718546876..eb97382750b 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -632,7 +632,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
passlen1 = MIN(passlen1, MAX_PASS_LEN);
passlen2 = MIN(passlen2, MAX_PASS_LEN);
- if(!doencrypt) {
+ if (!doencrypt) {
/* both Win95 and WinNT stuff up the password lengths for
non-encrypting systems. Uggh.
@@ -716,6 +716,14 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
return bad_password_error(inbuf, outbuf);
}
+ if (lp_security() == SEC_SHARE) {
+ /* in share level we should ignore any passwords */
+ smb_ntpasslen = 0;
+ smb_apasslen = 0;
+ guest = True;
+ }
+
+
DEBUG(3,("sesssetupX:name=[%s]\n",user));
/* If name ends in $ then I think it's asking about whether a */