1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

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 54f11999d2)
This commit is contained in:
Luke Leighton 1997-08-31 14:14:22 +00:00
parent f434139087
commit 3fc24dc9ed

View File

@ -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);
}