mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3: smbd: In call_trans2qfilepathinfo(), we must have an existing object in the QPATHINFO case.
qpathinfo must operate on an existing file, so we can exit early if filename_convert() returned the "new file" NT_STATUS_OK, !VALID_STAT case. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
parent
834aa7bb01
commit
6000d3408e
@ -6110,6 +6110,17 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* qpathinfo must operate on an existing file, so we
|
||||
* can exit early if filename_convert() returned the "new file"
|
||||
* NT_STATUS_OK, !VALID_STAT case.
|
||||
*/
|
||||
|
||||
if (!VALID_STAT(smb_fname->st)) {
|
||||
reply_nterror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* smb_fname->fsp may be NULL if smb_fname points at a symlink
|
||||
* and we're in POSIX context, so be careful when using fsp
|
||||
|
Loading…
Reference in New Issue
Block a user