From: Jeremy Allison Date: Mon, 8 Jul 2019 22:01:43 +0000 (-0700) Subject: s3: smbd: Remove MAX_OPEN_DIRECTORIES check in dptr_create(). X-Git-Tag: talloc-2.3.0~140 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7b98319f3057bea2e78be7b540f640fc476c770c;p=thirdparty%2Fsamba.git s3: smbd: Remove MAX_OPEN_DIRECTORIES check in dptr_create(). This is a bug in that it's artificially limiting the number of open directories an SMB2 client can have. If this code was needed it should by SMB1 specific. However we should allow the clients to decide for themselves how many directory handles they need, not limit to MAX_OPEN_DIRECTORIES. Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider --- diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 9dddab7b0dd..421de0af5a7 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -546,10 +546,6 @@ NTSTATUS dptr_create(connection_struct *conn, return map_nt_error_from_unix(errno); } - if (sconn->searches.dirhandles_open >= MAX_OPEN_DIRECTORIES) { - dptr_idleoldest(sconn); - } - dptr = talloc_zero(NULL, struct dptr_struct); if(!dptr) { DEBUG(0,("talloc fail in dptr_create.\n"));