From 55f480b009a577d47dd7ea430607a91db858485f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 15 Mar 2005 23:46:22 +0000 Subject: r5816: Catch the "." resume name case also. Jeremy. (This used to be commit 479bb6ea95e45d6f9d8b5dbddd500451e39202a7) --- source3/smbd/trans2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index c21fe1113e..54234deb35 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1569,12 +1569,14 @@ 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)) { - /* Win9x can send a resume name of "..". This will cause the parser to + /* Win9x or OS/2 can send a resume name of ".." or ".". 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 + path or an invalid name). 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)) { + 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 { return ERROR_NT(ntstatus); } -- cgit