From f4673e9656c16ff383cc6cf1caf523c913f2d3bd Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 7 Feb 2019 12:11:42 +0100 Subject: [PATCH 1/2] Remove ZERO_STRUCT() call ipa_sam uses Samba's macro ZERO_STRUCT() to safely zero out a block in memory. On F30 ZERO_STRUCT() is currently broken, because it uses the undefined C11 function memset_s(). During investigation of the bug, it turned out that ZERO_STRUCT(td->security_identifier) is not needed. The whole td struct is allocated with talloc_zero(), so td->security_identifier is already zeroed. See: https://bugzilla.redhat.com/show_bug.cgi?id=1672231 Signed-off-by: Christian Heimes Reviewed-By: Alexander Bokovoy (cherry picked from commit 1355588768c7863234c518196f48527e119740e0) --- daemons/ipa-sam/ipa_sam.c | 1 - 1 file changed, 1 deletion(-) diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 755f44d68..2f78f82f9 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -2266,7 +2266,6 @@ static bool fill_pdb_trusted_domain(TALLOC_CTX *mem_ctx, if (dummy == NULL) { DEBUG(9, ("Attribute %s not present.\n", LDAP_ATTRIBUTE_TRUST_SID)); - ZERO_STRUCT(td->security_identifier); } else { err = sss_idmap_sid_to_smb_sid(ipasam_state->idmap_ctx, dummy, &sid); -- 2.21.0