diff options
-rw-r--r-- | source3/smbd/trans2.c | 11 |
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); } } |