From 1ed62fde09f382342a396a047975fdeeea7113bb Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 19 Jan 2005 16:13:26 +0000 Subject: r4847: Hand over a acb_mask to pdb_setsampwent in load_sampwd_entries(). This allows the ldap-backend to search much more effeciently. Machines will be searched in the ldap_machine_suffix and users in the ldap_users_suffix. (Note that we already use the ldap_group_suffix in ldapsam_setsamgrent for quite some time). Using the specific ldap-bases becomes notably important in large domains: On my testmachine "net rpc trustdom list" has to search through 40k accounts just to list 3 interdomain-trust-accounts, similiar effects show up the non-user query_dispinfo-calls, etc. Also renamed all_machines to only_machines in load_sampwd_entries() since that reflects better what is really meant. Guenther (This used to be commit 6394257cc721ca739bda0e320375f04506913533) --- source3/include/passdb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/include') diff --git a/source3/include/passdb.h b/source3/include/passdb.h index db6bc2ac75..1b9ccc50ee 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -241,7 +241,7 @@ struct acct_info * this SAMBA will load. Increment this if *ANY* changes are made to the interface. */ -#define PASSDB_INTERFACE_VERSION 5 +#define PASSDB_INTERFACE_VERSION 6 typedef struct pdb_context { @@ -251,7 +251,7 @@ typedef struct pdb_context /* These functions are wrappers for the functions listed above. They may do extra things like re-reading a SAM_ACCOUNT on update */ - NTSTATUS (*pdb_setsampwent)(struct pdb_context *, BOOL update); + NTSTATUS (*pdb_setsampwent)(struct pdb_context *, BOOL update, uint16 acb_mask); void (*pdb_endsampwent)(struct pdb_context *); @@ -349,7 +349,7 @@ typedef struct pdb_methods struct pdb_methods *next; struct pdb_methods *prev; - NTSTATUS (*setsampwent)(struct pdb_methods *, BOOL update); + NTSTATUS (*setsampwent)(struct pdb_methods *, BOOL update, uint16 acb_mask); void (*endsampwent)(struct pdb_methods *); -- cgit