From e6c6c0438d07d4362b2a773199b288ed5335c23d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 18 Jul 2007 01:27:03 +0000 Subject: r23942: Fix issue found by Shlomi Yaakobovich 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) --- source3/smbd/trans2.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source3/smbd/trans2.c') 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); } } -- cgit