summaryrefslogtreecommitdiffstats
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-07-18 01:27:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:47 -0500
commite6c6c0438d07d4362b2a773199b288ed5335c23d (patch)
tree817f0641c40ec456254cbb9c2cce5a793551c165 /source3/smbd/trans2.c
parent921ac7da4f00b86b853dd0874c7ca0d4c8677486 (diff)
downloadsamba-e6c6c0438d07d4362b2a773199b288ed5335c23d.tar.gz
samba-e6c6c0438d07d4362b2a773199b288ed5335c23d.tar.xz
samba-e6c6c0438d07d4362b2a773199b288ed5335c23d.zip
r23942: Fix issue found by Shlomi Yaakobovich <Shlomi@exanet.com> where
invalid names sent as a resume name were incorrectly mapped into . and .. Ensure they really *are . and .. Jeremy. (This used to be commit 78d0c5194fe42ad4f096657e2210a15541303a2a)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 2d7d96e8b3..18b51ab56c 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2024,11 +2024,12 @@ static int call_trans2findnext(connection_struct *conn, char *inbuf, char *outbu
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);
}
}