svn commit: samba r23942 - in branches: SAMBA_3_0_25/source/smbd
SAMBA_3_2/source/smbd SAMBA_3_2_0/source/smbd
jra at samba.org
jra at samba.org
Wed Jul 18 01:27:04 GMT 2007
Author: jra
Date: 2007-07-18 01:27:03 +0000 (Wed, 18 Jul 2007)
New Revision: 23942
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23942
Log:
Fix issue found by Shlomi Yaakobovich <Shlomi at exanet.com> where
invalid names sent as a resume name were incorrectly mapped into
. and .. Ensure they really *are . and ..
Jeremy.
Modified:
branches/SAMBA_3_0_25/source/smbd/trans2.c
branches/SAMBA_3_2/source/smbd/trans2.c
branches/SAMBA_3_2_0/source/smbd/trans2.c
Changeset:
Modified: branches/SAMBA_3_0_25/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-07-18 00:18:57 UTC (rev 23941)
+++ branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-07-18 01:27:03 UTC (rev 23942)
@@ -1999,11 +1999,11 @@
complain (it thinks we're asking for the directory above the shared
path or an invalid name). Catch this as the resume name is only compared, never used in
a file access. JRA. */
- if (NT_STATUS_EQUAL(ntstatus,NT_STATUS_OBJECT_PATH_SYNTAX_BAD)) {
- pstrcpy(resume_name, "..");
- } else if (NT_STATUS_EQUAL(ntstatus,NT_STATUS_OBJECT_NAME_INVALID)) {
- pstrcpy(resume_name, ".");
- } else {
+ srvstr_pull(inbuf, resume_name, params+12,
+ sizeof(resume_name), total_params - 12,
+ STR_TERMINATE);
+
+ if (!(ISDOT(resume_name) || ISDOTDOT(resume_name))) {
return ERROR_NT(ntstatus);
}
}
Modified: branches/SAMBA_3_2/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/trans2.c 2007-07-18 00:18:57 UTC (rev 23941)
+++ branches/SAMBA_3_2/source/smbd/trans2.c 2007-07-18 01:27:03 UTC (rev 23942)
@@ -2024,11 +2024,12 @@
complain (it thinks we're asking for the directory above the shared
path or an invalid name). Catch this as the resume name is only compared, never used in
a file access. JRA. */
- if (NT_STATUS_EQUAL(ntstatus,NT_STATUS_OBJECT_PATH_SYNTAX_BAD)) {
- pstrcpy(resume_name, "..");
- } else if (NT_STATUS_EQUAL(ntstatus,NT_STATUS_OBJECT_NAME_INVALID)) {
- pstrcpy(resume_name, ".");
- } else {
+ srvstr_pull(inbuf, SVAL(inbuf,smb_flg2),
+ resume_name, params+12,
+ sizeof(resume_name), total_params - 12,
+ STR_TERMINATE);
+
+ if (!(ISDOT(resume_name) || ISDOTDOT(resume_name))) {
return ERROR_NT(ntstatus);
}
}
Modified: branches/SAMBA_3_2_0/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_2_0/source/smbd/trans2.c 2007-07-18 00:18:57 UTC (rev 23941)
+++ branches/SAMBA_3_2_0/source/smbd/trans2.c 2007-07-18 01:27:03 UTC (rev 23942)
@@ -2008,11 +2008,12 @@
complain (it thinks we're asking for the directory above the shared
path or an invalid name). Catch this as the resume name is only compared, never used in
a file access. JRA. */
- if (NT_STATUS_EQUAL(ntstatus,NT_STATUS_OBJECT_PATH_SYNTAX_BAD)) {
- pstrcpy(resume_name, "..");
- } else if (NT_STATUS_EQUAL(ntstatus,NT_STATUS_OBJECT_NAME_INVALID)) {
- pstrcpy(resume_name, ".");
- } else {
+ srvstr_pull(inbuf, SVAL(inbuf,smb_flg2),
+ resume_name, params+12,
+ sizeof(resume_name), total_params - 12,
+ STR_TERMINATE);
+
+ if (!(ISDOT(resume_name) || ISDOTDOT(resume_name))) {
return ERROR_NT(ntstatus);
}
}
More information about the samba-cvs
mailing list