diff options
author | Luke Leighton <lkcl@samba.org> | 2000-03-06 09:34:19 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-03-06 09:34:19 +0000 |
commit | a7a3c1f574adb5bac3e89213b970ed5b88ba43a0 (patch) | |
tree | 81e92a36f278533f11748a3952797d86c44d17c0 | |
parent | c8161178ac29f606a0e3822fce937af85140c8ca (diff) | |
download | samba-a7a3c1f574adb5bac3e89213b970ed5b88ba43a0.tar.gz |
interesting. had to add code to stop cascade's SMBtconX encrypted password
from being used, i have a) no idea if it's valid b) no idea how to decode
it!
-rw-r--r-- | source/smbd/reply.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index d83aed39fc4..e3d7f1a6a22 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -258,6 +258,7 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt int passlen = SVAL(inbuf,smb_vwv3); char *path; char *p; + BOOL doencrypt = SMBENCRYPT(); *service = *user = *password = *devicename = 0; @@ -279,7 +280,12 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt *password = 0; passlen = strlen(password); } - + else if (doencrypt) + { + passlen = 0; + *password = 0; + } + fstrcpy(service,path+2); p = strchr(service,'\\'); if (!p) @@ -464,6 +470,8 @@ user %s attempted down-level SMB connection\n", user)); enum remote_arch_types ra_type = get_remote_arch(); char *p = smb_buf(inbuf); + DEBUG(10,("passlen1: %d passlen2: %d\n", passlen1, passlen2)); + global_client_caps = IVAL(inbuf,smb_vwv11); /* client_caps is used as final determination if client is NT or Win95. @@ -548,8 +556,8 @@ user %s attempted down-level SMB connection\n", user)); fstrcpy(user,p); p = skip_string(p,1); domain = p; - DEBUG(3,("Domain=[%s] NativeOS=[%s] NativeLanMan=[%s]\n", - domain, skip_string(p,1), skip_string(p,2))); + DEBUG(3,("passlen: %d %d Domain=[%s] NativeOS=[%s] NativeLanMan=[%s]\n", + passlen1, passlen2, domain, skip_string(p,1), skip_string(p,2))); } DEBUG(3,("sesssetupX:name=[%s]\n",user)); |