s3: smbd: Change dptr_closecnum() to use dptr_close() instead of dptr_close_internal().
authorJeremy Allison <jra@samba.org>
Mon, 15 Jul 2019 23:06:09 +0000 (16:06 -0700)
committerRalph Boehme <slow@samba.org>
Tue, 6 Aug 2019 14:23:33 +0000 (14:23 +0000)
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 <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/dir.c

index 541e7cfff6208758e1526de52e5a4471dc4064e2..7483e6f5de47a19fdef81b7448e6422963551586 100644 (file)
@@ -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);
                }
        }
 }