From: Jeremy Allison Date: Mon, 15 Jul 2019 23:06:09 +0000 (-0700) Subject: s3: smbd: Change dptr_closecnum() to use dptr_close() instead of dptr_close_internal(). X-Git-Tag: tdb-1.4.2~367 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5f8769c25ec119805586c145c09f6a63603bc36;p=thirdparty%2Fsamba.git 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 --- 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); } } }