From: Jeremy Allison Date: Mon, 8 Jul 2019 22:23:57 +0000 (-0700) Subject: s3: smbd: Remove the 'close oldest' logic in SMB1search processing. X-Git-Tag: talloc-2.3.0~132 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1376dc3b840561cd782cd5f228eb1c43aa96f22d;p=thirdparty%2Fsamba.git s3: smbd: Remove the 'close oldest' logic in SMB1search processing. Expect the client to manage their handles properly. Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider --- diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index d0c452ef578..a2e0687da50 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -527,23 +527,12 @@ NTSTATUS dptr_create(connection_struct *conn, dptr->dnum = bitmap_find(sconn->searches.dptr_bmap, 0); if(dptr->dnum == -1 || dptr->dnum > 254) { - - /* - * Try and close the oldest handle not marked for - * expect close in the hope that the client has - * finished with that one. - */ - - dptr_close_oldest(sconn, true); - - /* Now try again... */ - dptr->dnum = bitmap_find(sconn->searches.dptr_bmap, 0); - if(dptr->dnum == -1 || dptr->dnum > 254) { - DEBUG(0,("dptr_create: returned %d: Error - all old dirptrs in use ?\n", dptr->dnum)); - TALLOC_FREE(dptr); - TALLOC_FREE(dir_hnd); - return NT_STATUS_TOO_MANY_OPENED_FILES; - } + DBG_ERR("returned %d: Error - all old " + "dirptrs in use ?\n", + dptr->dnum); + TALLOC_FREE(dptr); + TALLOC_FREE(dir_hnd); + return NT_STATUS_TOO_MANY_OPENED_FILES; } } else {