mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
CVE-2022-38023 libcli/auth: pass lp_ctx to netlogon_creds_cli_set_global_db()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15240 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
830e865ba5
commit
992f39a2c8
@ -202,7 +202,8 @@ 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)
|
||||
NTSTATUS netlogon_creds_cli_set_global_db(struct loadparm_context *lp_ctx,
|
||||
struct db_context **db)
|
||||
{
|
||||
if (netlogon_creds_cli_global_db != NULL) {
|
||||
return NT_STATUS_INVALID_PARAMETER_MIX;
|
||||
|
@ -31,7 +31,7 @@ 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_set_global_db(struct loadparm_context *lp_ctx, struct db_context **db);
|
||||
NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx);
|
||||
void netlogon_creds_cli_close_global_db(void);
|
||||
|
||||
|
@ -76,7 +76,7 @@ NTSTATUS rpccli_pre_open_netlogon_creds(void)
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
status = netlogon_creds_cli_set_global_db(&global_db);
|
||||
status = netlogon_creds_cli_set_global_db(lp_ctx, &global_db);
|
||||
TALLOC_FREE(frame);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
|
@ -82,7 +82,7 @@ int main(int argc, const char *argv[])
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = netlogon_creds_cli_set_global_db(&global_db);
|
||||
status = netlogon_creds_cli_set_global_db(lp_ctx, &global_db);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
fprintf(stderr,
|
||||
"netlogon_creds_cli_set_global_db failed: %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user