summaryrefslogtreecommitdiffstats
path: root/source/smbd/reply.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-09-23 01:25:33 +0000
committerAndrew Tridgell <tridge@samba.org>1998-09-23 01:25:33 +0000
commit24b8a757ae2899d54dd2b2f091a3c0de6de84dbb (patch)
treeb57add2a712188d4f8962517c9ba77069a5b0a93 /source/smbd/reply.c
parent1daf424da6c5a346f672121d4b6fe5753250f464 (diff)
downloadsamba-24b8a757ae2899d54dd2b2f091a3c0de6de84dbb.tar.gz
samba-24b8a757ae2899d54dd2b2f091a3c0de6de84dbb.tar.xz
samba-24b8a757ae2899d54dd2b2f091a3c0de6de84dbb.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!
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r--source/smbd/reply.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 254fb32a515..21fa2e9a790 100644
--- a/source/smbd/reply.c
+++ b/source/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);