diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-09-23 01:25:33 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-09-23 01:25:33 +0000 |
commit | 3b7cee95ac741ee24b8edd36095cc30e3377a23c (patch) | |
tree | b30be8eab5caf0ec26d5a459e5bed3eb94201a51 /source3/smbd/reply.c | |
parent | 242d068297b79af46c00a94d0e737c79e908a498 (diff) | |
download | samba-3b7cee95ac741ee24b8edd36095cc30e3377a23c.tar.gz samba-3b7cee95ac741ee24b8edd36095cc30e3377a23c.tar.bz2 samba-3b7cee95ac741ee24b8edd36095cc30e3377a23c.zip |
look at the CAP_NT_SMBS bit in the client capabilities to determine if
we should serve up volume labels as ascii or unicode.
NT wants ascii, W95 wants unicode. It's a crazy protocol!
(This used to be commit 24b8a757ae2899d54dd2b2f091a3c0de6de84dbb)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 254fb32a51..21fa2e9a79 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -41,6 +41,8 @@ extern pstring sesssetup_user; extern fstring global_myworkgroup; extern int Client; extern int global_oplock_break; +uint32 global_client_caps = 0; + /**************************************************************************** report a possible attack via the password buffer overflow bug @@ -489,11 +491,11 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int } 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); + 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. @@ -501,7 +503,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int if(ra_type == RA_WINNT || ra_type == RA_WIN95) { - if(client_caps & (CAP_NT_SMBS | CAP_STATUS32)) + if(global_client_caps & (CAP_NT_SMBS | CAP_STATUS32)) set_remote_arch( RA_WINNT); else set_remote_arch( RA_WIN95); |