mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
libcli/auth: add netlogon_creds_cli_set_global_db()
This can be used to inject a db_context from dbwrap_ctdb. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
c427b29be9
commit
ece3ba10a1
@ -199,6 +199,16 @@ static NTSTATUS netlogon_creds_cli_context_common(
|
||||
|
||||
static struct db_context *netlogon_creds_cli_global_db;
|
||||
|
||||
NTSTATUS netlogon_creds_cli_set_global_db(struct db_context **db)
|
||||
{
|
||||
if (netlogon_creds_cli_global_db != NULL) {
|
||||
return NT_STATUS_INVALID_PARAMETER_MIX;
|
||||
}
|
||||
|
||||
netlogon_creds_cli_global_db = talloc_move(talloc_autofree_context(), db);
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx)
|
||||
{
|
||||
char *fname;
|
||||
|
@ -28,7 +28,9 @@
|
||||
struct netlogon_creds_cli_context;
|
||||
struct messaging_context;
|
||||
struct dcerpc_binding_handle;
|
||||
struct db_context;
|
||||
|
||||
NTSTATUS netlogon_creds_cli_set_global_db(struct db_context **db);
|
||||
NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx);
|
||||
|
||||
NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
|
||||
|
Loading…
Reference in New Issue
Block a user