From: Andreas Schneider Date: Thu, 27 Oct 2022 06:47:32 +0000 (+0200) Subject: CVE-2022-37966 s3:utils: Fix old-style function definition X-Git-Tag: samba-4.15.13~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4543bd706e53844f0585aaa48a574bf8fe2050de;p=thirdparty%2Fsamba.git CVE-2022-37966 s3:utils: Fix old-style function definition Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison (cherry picked from commit b787692b5e915031d4653bf375995320ed1aca07) BUG: https://bugzilla.samba.org/show_bug.cgi?id=15237 Signed-off-by: Stefan Metzmacher --- diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index ad58d96100d..5ba57acc74c 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -366,7 +366,7 @@ const char *get_winbind_netbios_name(void) } -DATA_BLOB get_challenge(void) +DATA_BLOB get_challenge(void) { static DATA_BLOB chal; if (opt_challenge.length) @@ -442,7 +442,7 @@ static bool get_require_membership_sid(void) { * need to contact trusted domain */ -int get_pam_winbind_config() +int get_pam_winbind_config(void) { int ctrl = 0; struct tiniparser_dictionary *d = NULL; @@ -714,7 +714,7 @@ static NTSTATUS contact_winbind_change_pswd_auth_crap(const char *username, nt_status = (NT_STATUS(response.data.auth.nt_status)); if (!NT_STATUS_IS_OK(nt_status)) { - if (error_string) + if (error_string) *error_string = smb_xstrdup(response.data.auth.error_string); winbindd_free_response(&response); return nt_status; @@ -864,7 +864,7 @@ done: /** - * Return the challenge as determined by the authentication subsystem + * Return the challenge as determined by the authentication subsystem * @return an 8 byte random challenge */ @@ -872,7 +872,7 @@ static NTSTATUS ntlm_auth_get_challenge(struct auth4_context *auth_ctx, uint8_t chal[8]) { if (auth_ctx->challenge.data.length == 8) { - DEBUG(5, ("auth_get_challenge: returning previous challenge by module %s (normal)\n", + DEBUG(5, ("auth_get_challenge: returning previous challenge by module %s (normal)\n", auth_ctx->challenge.set_by)); memcpy(chal, auth_ctx->challenge.data.data, 8); return NT_STATUS_OK; @@ -1938,7 +1938,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod printf("Authenticated: Yes\n"); - if (ntlm_server_1_lm_session_key + if (ntlm_server_1_lm_session_key && (!all_zero(lm_key, sizeof(lm_key)))) { hex_lm_key = hex_encode_talloc(NULL,