svn commit: samba r21550 - in branches/SAMBA_3_0/source/rpc_server:
.
vlendec at samba.org
vlendec at samba.org
Mon Feb 26 22:48:42 GMT 2007
Author: vlendec
Date: 2007-02-26 22:48:42 +0000 (Mon, 26 Feb 2007)
New Revision: 21550
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21550
Log:
make disp_info_list static to get_samr_dispinfo_by_sid(), add a comment :-)
Modified:
branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c 2007-02-26 22:44:24 UTC (rev 21549)
+++ branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c 2007-02-26 22:48:42 UTC (rev 21550)
@@ -64,8 +64,6 @@
/* We keep a static list of these by SID as modern clients close down
all resources between each request in a complete enumeration. */
-static DISP_INFO *disp_info_list;
-
struct samr_info {
/* for use by the \PIPE\samr policy */
DOM_SID sid;
@@ -254,6 +252,24 @@
static DISP_INFO *get_samr_dispinfo_by_sid(DOM_SID *psid)
{
+ /*
+ * We do a static cache for DISP_INFO's here. Explanation can be found
+ * in Jeremy's checkin message to r11793:
+ *
+ * Fix the SAMR cache so it works across completely insane
+ * client behaviour (ie.:
+ * open pipe/open SAMR handle/enumerate 0 - 1024
+ * close SAMR handle, close pipe.
+ * open pipe/open SAMR handle/enumerate 1024 - 2048...
+ * close SAMR handle, close pipe.
+ * And on ad-nausium. Amazing.... probably object-oriented
+ * client side programming in action yet again.
+ * This change should *massively* improve performance when
+ * enumerating users from an LDAP database.
+ * Jeremy.
+ */
+
+ static DISP_INFO *disp_info_list;
TALLOC_CTX *mem_ctx;
DISP_INFO *dpi;
More information about the samba-cvs
mailing list