mirror of
https://github.com/samba-team/samba.git
synced 2025-08-08 13:49:29 +03:00
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 78d0c5194f
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
921ac7da4f
commit
e6c6c0438d
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user