diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/reply.c | 26 |
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); } |