From 3fc24dc9ed330d73aedbe2017cdfa5b5657e69cc Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sun, 31 Aug 1997 14:14:22 +0000 Subject: 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) --- source3/smbd/reply.c | 26 +++++++++++++++++++++++--- 1 file 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); } -- cgit