mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
s3: smbd: Prepare for SMB1 directory handle opens in call_trans2findnext()
Call close_file() on any SMB1 directory handle once the dptr is closed. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
264d6b408e
commit
5388df783e
@ -3143,6 +3143,7 @@ static void call_trans2findnext(connection_struct *conn,
|
||||
struct smbd_server_connection *sconn = req->sconn;
|
||||
bool backup_priv = false;
|
||||
bool as_root = false;
|
||||
files_struct *fsp = NULL;
|
||||
|
||||
if (total_params < 13) {
|
||||
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
|
||||
@ -3434,7 +3435,12 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
|
||||
/* Check if we can close the dirptr */
|
||||
if(close_after_request || (finished && close_if_end)) {
|
||||
DEBUG(5,("call_trans2findnext: closing dptr_num = %d\n", dptr_num));
|
||||
fsp = dptr_fsp(sconn, dptr_num);
|
||||
dptr_close(sconn, &dptr_num); /* This frees up the saved mask */
|
||||
if (fsp != NULL) {
|
||||
close_file(NULL, fsp, NORMAL_CLOSE);
|
||||
fsp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (as_root) {
|
||||
|
Loading…
Reference in New Issue
Block a user