summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-08-31 14:14:22 +0000
committerLuke Leighton <lkcl@samba.org>1997-08-31 14:14:22 +0000
commit3fc24dc9ed330d73aedbe2017cdfa5b5657e69cc (patch)
tree5946271a0256676d6c972a1fbb01da129e6e50bb /source3/smbd
parentf434139087ea45ed1eb578267843943b0f04c94c (diff)
downloadsamba-3fc24dc9ed330d73aedbe2017cdfa5b5657e69cc.tar.gz
samba-3fc24dc9ed330d73aedbe2017cdfa5b5657e69cc.tar.bz2
samba-3fc24dc9ed330d73aedbe2017cdfa5b5657e69cc.zip
added word count 3 support into reply_tcon_and_X (see cifs6.txt). the
only thing i couldn't do was get the chaining word count to point to the end of the smb reply, for the next and_X (not that there is one). (This used to be commit 54f11999d2113f2e88144ed63e23dd82b32e14a6)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 4616ea14ed..8e304a77df 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -261,7 +261,29 @@ int reply_tcon_and_X(char *inbuf,char *outbuf,int length,int bufsize)
if (connection_num < 0)
return(connection_error(inbuf,outbuf,connection_num));
- set_message(outbuf,2,strlen(devicename)+1,True);
+ if (Protocol < PROTOCOL_NT1)
+ {
+ set_message(outbuf,2,strlen(devicename)+1,True);
+ strcpy(smb_buf(outbuf),devicename);
+ }
+ else
+ {
+ char *fsname = "NTFS";
+ int devlen = strlen(devicename)+1;
+ int fslen = strlen(fsname)+1;
+ int len = devlen + fslen + 1;
+
+ char *p;
+ set_message(outbuf,3,3,True);
+
+ p = smb_buf(outbuf);
+ strcpy(p,devicename); p = skip_string(p,1); /* device name */
+ strcpy(p,fsname); p = skip_string(p,1); /* filesystem type e.g NTFS */
+
+ set_message(outbuf,3,PTR_DIFF(p,smb_buf(outbuf)),False);
+
+ SSVAL(outbuf, smb_vwv2, 0x0); /* optional support */
+ }
DEBUG(3,("%s tconX service=%s user=%s cnum=%d\n",timestring(),service,user,connection_num));
@@ -269,8 +291,6 @@ int reply_tcon_and_X(char *inbuf,char *outbuf,int length,int bufsize)
SSVAL(inbuf,smb_tid,connection_num);
SSVAL(outbuf,smb_tid,connection_num);
- strcpy(smb_buf(outbuf),devicename);
-
return chain_reply(inbuf,outbuf,length,bufsize);
}