summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-12 17:48:52 +0100
committerVolker Lendecke <vl@samba.org>2009-03-07 17:51:21 +0100
commit46bcb10b5abb21758cf234764b64220ede1b7ab5 (patch)
treec99007849f0599477797d3186c563f52d419513e /source3/include
parente58ade4136b40d82c24f3556845e7412a3330992 (diff)
downloadsamba-46bcb10b5abb21758cf234764b64220ede1b7ab5.tar.gz
samba-46bcb10b5abb21758cf234764b64220ede1b7ab5.tar.bz2
samba-46bcb10b5abb21758cf234764b64220ede1b7ab5.zip
Shape up pdb_search a bit by making it a talloc ctx with a destructor
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/passdb.h1
-rw-r--r--source3/include/proto.h10
2 files changed, 5 insertions, 6 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 93c1e3f0ab..9cbc6bd340 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -186,7 +186,6 @@ enum pdb_search_type {
};
struct pdb_search {
- TALLOC_CTX *mem_ctx;
enum pdb_search_type type;
struct samr_displayentry *cache;
uint32 num_entries;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 5cd4e459ae..b6ddacca75 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4617,14 +4617,14 @@ bool pdb_sid_to_id(const DOM_SID *sid, union unid_t *id,
bool pdb_rid_algorithm(void);
bool pdb_new_rid(uint32 *rid);
bool initialize_password_db(bool reload, struct event_context *event_ctx);
-struct pdb_search *pdb_search_init(enum pdb_search_type type);
-struct pdb_search *pdb_search_users(uint32 acct_flags);
-struct pdb_search *pdb_search_groups(void);
-struct pdb_search *pdb_search_aliases(const DOM_SID *sid);
+struct pdb_search *pdb_search_init(TALLOC_CTX *mem_ctx,
+ enum pdb_search_type type);
+struct pdb_search *pdb_search_users(TALLOC_CTX *mem_ctx, uint32 acct_flags);
+struct pdb_search *pdb_search_groups(TALLOC_CTX *mem_ctx);
+struct pdb_search *pdb_search_aliases(TALLOC_CTX *mem_ctx, 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);
bool pdb_get_trusteddom_pw(const char *domain, char** pwd, DOM_SID *sid,
time_t *pass_last_set_time);
bool pdb_set_trusteddom_pw(const char* domain, const char* pwd,