summaryrefslogtreecommitdiffstats
path: root/source/include/passdb.h
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-04-10 15:26:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:34 -0500
commit8b4f67a1e9d459145cde10b1064781d58d62b805 (patch)
treebbc320a2f956fa3fb034f3df70f7b14bb693375a /source/include/passdb.h
parentc73f2656fd89e227a8a3e2ab20f7393ff2c515c7 (diff)
downloadsamba-8b4f67a1e9d459145cde10b1064781d58d62b805.tar.gz
samba-8b4f67a1e9d459145cde10b1064781d58d62b805.tar.xz
samba-8b4f67a1e9d459145cde10b1064781d58d62b805.zip
r6277: This implements a new caching API for enumerating the pdb elements. It is
modeled after query_displayinfo and should hide the differences between users, groups and aliases while allowing a cache analog load_sampw_entries: struct pdb_search *pdb_search_users(uint16 acct_flags); struct pdb_search *pdb_search_groups(void); struct pdb_search *pdb_search_aliases(const DOM_SID *sid); uint32 pdb_search_entries(struct pdb_search *search, uint32 start_idx, uint32 max_entries, struct samr_displayentry **result); void pdb_search_destroy(struct pdb_search *search); Why this API? Eventually we will need to apply the work gd has started on enumerating users with paged ldap searches to groups and aliases. Before doing that I want to clean up the search routines we have. The sample application (more to follow) is 'net maxrid'. Volker
Diffstat (limited to 'source/include/passdb.h')
-rw-r--r--source/include/passdb.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/include/passdb.h b/source/include/passdb.h
index 2c63271492d..624f0c5fea6 100644
--- a/source/include/passdb.h
+++ b/source/include/passdb.h
@@ -480,4 +480,27 @@ struct pdb_init_function_entry {
enum sql_search_field { SQL_SEARCH_NONE = 0, SQL_SEARCH_USER_SID = 1, SQL_SEARCH_USER_NAME = 2};
+struct samr_displayentry {
+ uint32 rid;
+ uint16 acct_flags;
+ const char *account_name;
+ const char *fullname;
+ const char *description;
+};
+
+enum pdb_search_type {
+ PDB_USER_SEARCH,
+ PDB_GROUP_SEARCH,
+ PDB_ALIAS_SEARCH
+};
+
+struct pdb_search {
+ TALLOC_CTX *mem_ctx;
+ enum pdb_search_type type;
+ struct samr_displayentry *cache;
+ uint32 cache_size;
+ BOOL search_ended;
+ void *private;
+};
+
#endif /* _PASSDB_H */