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

fixed 3 bugs in jeremys trans2 merge. Hopefully it now works.

(This used to be commit 4a78137111)
This commit is contained in:
Andrew Tridgell 2002-06-26 06:39:54 +00:00
parent 12658bc725
commit 788c2c655b

View File

@ -200,8 +200,6 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i
int16 open_ofun;
int32 open_size;
char *pname;
int16 namelen;
pstring fname;
mode_t unixmode;
SMB_OFF_T size=0;
@ -231,8 +229,6 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i
open_size = IVAL(params,14);
pname = &params[28];
StrnCpy(fname,pname,namelen);
srvstr_pull(inbuf, fname, pname, sizeof(fname), -1, STR_TERMINATE);
DEBUG(3,("trans2open %s mode=%d attr=%d ofun=%d size=%d\n",
@ -1680,12 +1676,13 @@ static int call_trans2qfilepathinfo(connection_struct *conn,
sbuf.st_mtime &= ~1;
}
/* NT expects the name to be in an exact form */
/* NT expects the name to be in an exact form of the *full*
filename. See the trans2 torture test */
if (strequal(base_name,".")) {
pstrcpy(dos_fname, "\\");
} else {
snprintf(dos_fname, sizeof(dos_fname), "\\%s", base_name);
string_replace( dos_fname, '/', '\\');
snprintf(dos_fname, sizeof(dos_fname), "\\%s", fname);
string_replace(dos_fname, '/', '\\');
}
switch (info_level) {
@ -1918,7 +1915,6 @@ static int call_trans2qfilepathinfo(connection_struct *conn,
data_size = 0;
} else {
size_t byte_len = dos_PutUniCode(pdata+24,"::$DATA", 0xE, False);
SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2)|FLAGS2_UNICODE_STRINGS);
SIVAL(pdata,0,0); /* ??? */
SIVAL(pdata,4,byte_len); /* Byte length of unicode string ::$DATA */
SOFF_T(pdata,8,size);