diff options
author | Jeremy Allison <jra@samba.org> | 1997-09-04 20:26:07 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1997-09-04 20:26:07 +0000 |
commit | f5302af621d91536a72b437ae2b80f9dedb46920 (patch) | |
tree | 7a72ab4e6d1a1cbff79ea9262b82b8e696203e6f /source3/smbd/reply.c | |
parent | 82290216ad827c9f8f74ffd3aa6a37dca28174e1 (diff) | |
download | samba-f5302af621d91536a72b437ae2b80f9dedb46920.tar.gz samba-f5302af621d91536a72b437ae2b80f9dedb46920.tar.xz samba-f5302af621d91536a72b437ae2b80f9dedb46920.zip |
Fixed up determination of client type for PROTOCOL_NT1. Uses client
capabilities bits in session_setup_and_X to decide. Made remote_arch
an enum as well as a string, for easier use.
Jeremy (jallison@whistle.com)
(This used to be commit 99080705a2d0adcb25e1eecbe517a2fac2779baa)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 58b509ecec..773063131a 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -367,8 +367,24 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize) } else { uint16 passlen1 = SVAL(inbuf,smb_vwv7); uint16 passlen2 = SVAL(inbuf,smb_vwv8); + uint32 client_caps = IVAL(inbuf,smb_vwv11); + enum remote_arch_types ra_type = get_remote_arch(); + char *p = smb_buf(inbuf); + /* client_caps is used as final determination if client is NT or Win95. + This is needed to return the correct error codes in some + circumstances. + */ + + if(ra_type == RA_WINNT || ra_type == RA_WIN95) + { + if(client_caps & (CAP_NT_SMBS | CAP_STATUS32)) + set_remote_arch( RA_WINNT); + else + set_remote_arch( RA_WIN95); + } + if (passlen1 != 24 && passlen2 != 24) doencrypt = False; |