Re: svn commit: samba r23727 - in branches/SAMBA_3_0/source/smbd: .

2007-07-06 Thread Jeremy Allison
On Thu, Jul 05, 2007 at 04:36:16PM +, [EMAIL PROTECTED] wrote:
 Author: vlendec
 Date: 2007-07-05 16:36:15 + (Thu, 05 Jul 2007)
 New Revision: 23727
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23727
 
 Log:
 Explicitly pass down FLAGS2 to srvstr_get_path.
 
 Next step is to remove the bug that in the trans2 code we use the inbuf
 as the base pointer to decide whether we need ucs2 alignment where we
 need to use the beginning of the params buffer
 
 Jeremy, last one for today to reviw :-)

+1 looks good to me.

Thanks,

Jeremy.


svn commit: samba r23727 - in branches/SAMBA_3_0/source/smbd: .

2007-07-05 Thread vlendec
Author: vlendec
Date: 2007-07-05 16:36:15 + (Thu, 05 Jul 2007)
New Revision: 23727

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23727

Log:
Explicitly pass down FLAGS2 to srvstr_get_path.

Next step is to remove the bug that in the trans2 code we use the inbuf
as the base pointer to decide whether we need ucs2 alignment where we
need to use the beginning of the params buffer

Jeremy, last one for today to reviw :-)


Modified:
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/nttrans.c
===
--- branches/SAMBA_3_0/source/smbd/nttrans.c2007-07-05 16:33:37 UTC (rev 
23726)
+++ branches/SAMBA_3_0/source/smbd/nttrans.c2007-07-05 16:36:15 UTC (rev 
23727)
@@ -562,7 +562,9 @@
 
if(!dir_fsp-is_directory) {
 
-   srvstr_get_path(inbuf, fname, smb_buf(inbuf), 
sizeof(fname), 0, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname,
+   smb_buf(inbuf), sizeof(fname), 0,
+   STR_TERMINATE, status);
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
@@ -604,14 +606,18 @@
dir_name_len++;
}
 
-   srvstr_get_path(inbuf, rel_fname, smb_buf(inbuf), 
sizeof(rel_fname), 0, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), rel_fname,
+   smb_buf(inbuf), sizeof(rel_fname), 0,
+   STR_TERMINATE, status);
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
}
pstrcat(fname, rel_fname);
} else {
-   srvstr_get_path(inbuf, fname, smb_buf(inbuf), sizeof(fname), 0, 
STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname,
+   smb_buf(inbuf), sizeof(fname), 0,
+   STR_TERMINATE, status);
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
@@ -1011,7 +1017,9 @@
 
flags = IVAL(params,0);
 
-   srvstr_get_path(inbuf, fname, params+53, sizeof(fname), 
parameter_count-53, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname, params+53,
+   sizeof(fname), parameter_count-53, STR_TERMINATE,
+   status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
@@ -1288,7 +1296,10 @@
}
 
if(!dir_fsp-is_directory) {
-   srvstr_get_path(inbuf, fname, params+53, sizeof(fname), 
parameter_count-53, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname,
+   params+53, sizeof(fname),
+   parameter_count-53, STR_TERMINATE,
+   status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
@@ -1322,14 +1333,19 @@
 
{
pstring tmpname;
-   srvstr_get_path(inbuf, tmpname, params+53, 
sizeof(tmpname), parameter_count-53, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), tmpname,
+   params+53, sizeof(tmpname),
+   parameter_count-53, STR_TERMINATE,
+   status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
pstrcat(fname, tmpname);
}
} else {
-   srvstr_get_path(inbuf, fname, params+53, sizeof(fname), 
parameter_count-53, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname, params+53,
+   sizeof(fname), parameter_count-53,
+   STR_TERMINATE, status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
@@ -1842,7 +1858,9 @@
init_smb_request(req, (uint8 *)inbuf);
 
p = smb_buf(inbuf) + 1;
-   p += srvstr_get_path_wcard(inbuf, oldname, p, sizeof(oldname), 0, 
STR_TERMINATE, status, src_has_wcard);
+   p += srvstr_get_path_wcard(inbuf,