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