diff options
author | Jeremy Allison <jra@samba.org> | 2003-12-01 02:25:53 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-12-01 02:25:53 +0000 |
commit | c05411beae9969b1dca9de1412a7a5f432915d51 (patch) | |
tree | ba19da81107f7e4a2a4d0b4e88c8c8ef539fb3b0 /source3/smbd/sesssetup.c | |
parent | 003f2cb9f9bcf5c7ae7265fe13757ed385d5bbaa (diff) | |
download | samba-c05411beae9969b1dca9de1412a7a5f432915d51.tar.gz samba-c05411beae9969b1dca9de1412a7a5f432915d51.tar.bz2 samba-c05411beae9969b1dca9de1412a7a5f432915d51.zip |
Don't automatically set nt status code flag unless client tells us it can
cope.
Jeremy.
(This used to be commit dd1ac8d5eba060dcd7fdde7449d07bee1dc12b27)
Diffstat (limited to 'source3/smbd/sesssetup.c')
-rw-r--r-- | source3/smbd/sesssetup.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 64c25db2ab..fb0744bb73 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -472,6 +472,11 @@ static int reply_sesssetup_and_X_spnego(connection_struct *conn, char *inbuf, if (global_client_caps == 0) { global_client_caps = IVAL(inbuf,smb_vwv10); + + if (global_client_caps & CAP_STATUS32) { + add_to_common_flags2(FLAGS2_32_BIT_ERROR_CODES); + } + } p = (uint8 *)smb_buf(inbuf); @@ -615,17 +620,22 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, enum remote_arch_types ra_type = get_remote_arch(); char *p = smb_buf(inbuf); - if(global_client_caps == 0) + if(global_client_caps == 0) { global_client_caps = IVAL(inbuf,smb_vwv11); - /* 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 (global_client_caps & CAP_STATUS32) { + add_to_common_flags2(FLAGS2_32_BIT_ERROR_CODES); + } + + /* 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_WIN2K || ra_type == RA_WIN95) { - if(!(global_client_caps & (CAP_NT_SMBS | CAP_STATUS32))) { - set_remote_arch( RA_WIN95); + if(ra_type == RA_WINNT || ra_type == RA_WIN2K || ra_type == RA_WIN95) { + if(!(global_client_caps & (CAP_NT_SMBS | CAP_STATUS32))) { + set_remote_arch( RA_WIN95); + } } } @@ -686,7 +696,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, ra_lanman_string( native_lanman ); } - + if (SVAL(inbuf,smb_vwv4) == 0) { setup_new_vc_session(); } |