summaryrefslogtreecommitdiff
path: root/source3/include/passdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/passdb.h')
-rw-r--r--source3/include/passdb.h86
1 files changed, 52 insertions, 34 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 624f0c5fea..0c816271b0 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -232,6 +232,30 @@ struct acct_info
uint32 rid; /* domain-relative RID */
};
+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 num_entries;
+ ssize_t cache_size;
+ BOOL search_ended;
+ void *private;
+};
+
/*****************************************************************
Functions to be implemented by the new (v2) passdb API
****************************************************************/
@@ -310,12 +334,6 @@ typedef struct pdb_context
NTSTATUS (*pdb_delete_alias)(struct pdb_context *context,
const DOM_SID *sid);
- NTSTATUS (*pdb_enum_aliases)(struct pdb_context *context,
- const DOM_SID *domain_sid,
- uint32 start_idx, uint32 num_entries,
- uint32 *num_aliases,
- struct acct_info **aliases);
-
NTSTATUS (*pdb_get_aliasinfo)(struct pdb_context *context,
const DOM_SID *sid,
struct acct_info *info);
@@ -352,6 +370,20 @@ typedef struct pdb_context
const char ***names,
uint32 **attrs);
+ BOOL (*pdb_search_users)(struct pdb_context *context,
+ struct pdb_search *search,
+ uint16 acct_flags);
+ BOOL (*pdb_search_groups)(struct pdb_context *context,
+ struct pdb_search *search);
+ BOOL (*pdb_search_aliases)(struct pdb_context *context,
+ struct pdb_search *search,
+ const DOM_SID *sid);
+ BOOL (*pdb_search_next_entry)(struct pdb_context *context,
+ struct pdb_search *search,
+ struct samr_displayentry *entry);
+ void (*pdb_search_end)(struct pdb_context *context,
+ struct pdb_search *search);
+
void (*free_fn)(struct pdb_context **);
TALLOC_CTX *mem_ctx;
@@ -426,11 +458,6 @@ typedef struct pdb_methods
NTSTATUS (*delete_alias)(struct pdb_methods *methods,
const DOM_SID *sid);
- NTSTATUS (*enum_aliases)(struct pdb_methods *methods,
- const DOM_SID *domain_sid,
- uint32 start_idx, uint32 max_entries,
- uint32 *num_aliases, struct acct_info **info);
-
NTSTATUS (*get_aliasinfo)(struct pdb_methods *methods,
const DOM_SID *sid,
struct acct_info *info);
@@ -461,6 +488,20 @@ typedef struct pdb_methods
const char ***names,
uint32 **attrs);
+ BOOL (*search_users)(struct pdb_methods *methods,
+ struct pdb_search *search,
+ uint16 acct_flags);
+ BOOL (*search_groups)(struct pdb_methods *methods,
+ struct pdb_search *search);
+ BOOL (*search_aliases)(struct pdb_methods *methods,
+ struct pdb_search *search,
+ const DOM_SID *sid);
+ BOOL (*search_next_entry)(struct pdb_methods *methods,
+ struct pdb_search *search,
+ struct samr_displayentry *entry);
+ void (*search_end)(struct pdb_methods *methods,
+ struct pdb_search *search);
+
void *private_data; /* Private data of some kind */
void (*free_private_data)(void **);
@@ -480,27 +521,4 @@ 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 */