diff options
author | Volker Lendecke <vl@samba.org> | 2017-09-05 14:56:58 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-09-16 08:36:17 +0200 |
commit | 1de1fd86533d05d92e7df411fac2091f4abbc0bc (patch) | |
tree | e5241a4a3172348c3daf75a85bef8ffcd8ea9325 /libcli | |
parent | 47557ac9b11c215906b7a1cd7b3a7c6982aac282 (diff) | |
download | samba-1de1fd86533d05d92e7df411fac2091f4abbc0bc.tar.gz |
netlogon_creds_cli: A netlogon_creds_cli_context needs a msg_ctx
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/auth/netlogon_creds_cli.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c index 5ec72aa1990..751c09f4bdd 100644 --- a/libcli/auth/netlogon_creds_cli.c +++ b/libcli/auth/netlogon_creds_cli.c @@ -283,6 +283,10 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx, *_context = NULL; + if (msg_ctx == NULL) { + return NT_STATUS_INVALID_PARAMETER_MIX; + } + client_computer = lpcfg_netbios_name(lp_ctx); if (strlen(client_computer) > 15) { return NT_STATUS_INVALID_PARAMETER_MIX; @@ -433,13 +437,11 @@ NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx, return status; } - if (msg_ctx != NULL) { - context->db.g_ctx = g_lock_ctx_init(context, msg_ctx); - if (context->db.g_ctx == NULL) { - TALLOC_FREE(context); - TALLOC_FREE(frame); - return NT_STATUS_NO_MEMORY; - } + context->db.g_ctx = g_lock_ctx_init(context, msg_ctx); + if (context->db.g_ctx == NULL) { + TALLOC_FREE(context); + TALLOC_FREE(frame); + return NT_STATUS_NO_MEMORY; } if (netlogon_creds_cli_global_db != NULL) { |