pgreco / rpms / ipa

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