summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-15 23:40:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:03 -0500
commit4f92cefcad567c2098e02d902783ac9e722fd02e (patch)
tree0c591eba8dacced1324f7c1b4cf03da08f7be23a /source3
parentcc944794c19b672fba1c77d43f198654c009dd55 (diff)
downloadsamba-4f92cefcad567c2098e02d902783ac9e722fd02e.tar.gz
samba-4f92cefcad567c2098e02d902783ac9e722fd02e.tar.bz2
samba-4f92cefcad567c2098e02d902783ac9e722fd02e.zip
r5813: Fix bug found by Jim McDonough <jmcd@us.ibm.com>
Win9x can send a resume name of "..". This will cause the parser to complain (it thinks we're asking for the directory above the shared path). Catch this as the resume name is only compared, never used in a file access and replace it with "..". Jeremy. (This used to be commit c03524363f86ab88f1408f2fba2a1d76ce830301)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 3f3d9c2f46..c21fe1113e 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1569,7 +1569,15 @@ static int call_trans2findnext(connection_struct *conn, char *inbuf, char *outbu
srvstr_get_path(inbuf, resume_name, params+12, sizeof(resume_name), -1, STR_TERMINATE, &ntstatus, True);
if (!NT_STATUS_IS_OK(ntstatus)) {
- return ERROR_NT(ntstatus);
+ /* Win9x can send a resume name of "..". This will cause the parser to
+ complain (it thinks we're asking for the directory above the shared
+ path). Catch this as the resume name is only compared, never used in
+ a file access. JRA. */
+ if (NT_STATUS_V(ntstatus) == NT_STATUS_V(NT_STATUS_OBJECT_PATH_SYNTAX_BAD)) {
+ pstrcpy(resume_name, "..");
+ } else {
+ return ERROR_NT(ntstatus);
+ }
}
DEBUG(3,("call_trans2findnext: dirhandle = %d, max_data_bytes = %d, maxentries = %d, \