1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

s3: smbd: Remove dptr_close() from reply_search().

Now we're handle-based close_file() already does
what is needed to shut down directory enumeration.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2019-07-17 13:35:57 -07:00 committed by Ralph Boehme
parent f5eebfc725
commit 24722da0b1

View File

@ -2062,14 +2062,14 @@ void reply_search(struct smb_request *req)
(X/Open spec) */
if (numentries == 0) {
dptr_close(sconn, &dptr_num);
dptr_num = -1;
if (fsp != NULL) {
close_file(NULL, fsp, NORMAL_CLOSE);
fsp = NULL;
}
} else if(expect_close && status_len == 0) {
/* Close the dptr - we know it's gone */
dptr_close(sconn, &dptr_num);
dptr_num = -1;
if (fsp != NULL) {
close_file(NULL, fsp, NORMAL_CLOSE);
fsp = NULL;
@ -2078,7 +2078,7 @@ void reply_search(struct smb_request *req)
/* If we were called as SMBfunique, then we can close the fsp->dptr now ! */
if(dptr_num >= 0 && req->cmd == SMBfunique) {
dptr_close(sconn, &dptr_num);
dptr_num = -1;
/* fsp may have been closed above. */
if (fsp != NULL) {
close_file(NULL, fsp, NORMAL_CLOSE);