mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
smbd: close_file() should never see an internal dirfsp.
Assert this is the case. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Dec 18 16:27:38 UTC 2020 on sn-devel-184
This commit is contained in:
parent
a77de71ced
commit
6b5041c021
@ -1291,13 +1291,11 @@ NTSTATUS close_file(struct smb_request *req, files_struct *fsp,
|
||||
NTSTATUS status;
|
||||
struct files_struct *base_fsp = fsp->base_fsp;
|
||||
|
||||
if (fsp->fsp_flags.is_dirfsp) {
|
||||
/*
|
||||
* The typical way to get here is via file_close_[conn|user]()
|
||||
* and this is taken care of below.
|
||||
*/
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
/*
|
||||
* This fsp can never be an internal dirfsp. They must
|
||||
* be explicitly closed by TALLOC_FREE of the dir handle.
|
||||
*/
|
||||
SMB_ASSERT(!fsp->fsp_flags.is_dirfsp);
|
||||
|
||||
if (fsp->fsp_flags.is_directory) {
|
||||
status = close_directory(req, fsp, close_type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user