diff options
author | Luke Leighton <lkcl@samba.org> | 1997-08-31 14:14:22 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-08-31 14:14:22 +0000 |
commit | 54f11999d2113f2e88144ed63e23dd82b32e14a6 (patch) | |
tree | c970647baa656c59b2b9f726e247645628e9c8e2 /source/smbd/reply.c | |
parent | 3556763be3acbf01c967ee9717943dd44163fb9f (diff) | |
download | samba-54f11999d2113f2e88144ed63e23dd82b32e14a6.tar.gz samba-54f11999d2113f2e88144ed63e23dd82b32e14a6.tar.xz samba-54f11999d2113f2e88144ed63e23dd82b32e14a6.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).
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 4616ea14ed0..8e304a77dfd 100644 --- a/source/smbd/reply.c +++ b/source/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); } |