From a5f8769c25ec119805586c145c09f6a63603bc36 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 15 Jul 2019 16:06:09 -0700 Subject: [PATCH] s3: smbd: Change dptr_closecnum() to use dptr_close() instead of dptr_close_internal(). This will allow us to close any outstanding handles on an SMB1 connection as later commits move us to using directory handles instead of pathname directory opens. This is inefficient, as it means walking the list twice, but this will only be called with active dptrs in the OS/2 -1 case, in the connection shutdown case the directory handles will already have been closed. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 541e7cfff62..7483e6f5de4 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -276,7 +276,8 @@ void dptr_closecnum(connection_struct *conn) for(dptr = sconn->searches.dirptrs; dptr; dptr = next) { next = dptr->next; if (dptr->conn == conn) { - dptr_close_internal(dptr); + int key = dptr->dnum; + dptr_close(sconn, &key); } } } -- 2.47.3