On (14/10/14 14:27), Jakub Hrozek wrote:
Hi,
I stumbled upon a crash when reviewing Pavel's recent subdomain fix against an IPA 3.3 server. I'm not sure if it's the right way to fix the problem, normally I would prefer a { NULL } array so the loop falls through, but this quick patch allowed me to at least continue with the review..
From 4eb6b369127a4ef896036cdcbef7fd03f5b10e7f Mon Sep 17 00:00:00 2001 From: Jakub Hrozek jhrozek@redhat.com Date: Tue, 14 Oct 2014 14:15:25 +0200 Subject: [PATCH] IPA: Handle NULL members in process_members()
src/providers/ipa/ipa_s2n_exop.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c index 0d5c35678efda5a87fa0d9164542cbb89ff4edf9..680340688fd983bd131d382b11cad2963a8088b2 100644 --- a/src/providers/ipa/ipa_s2n_exop.c +++ b/src/providers/ipa/ipa_s2n_exop.c @@ -1126,6 +1126,11 @@ static errno_t process_members(struct sss_domain_info *domain, struct sss_domain_info *obj_domain; struct sss_domain_info *parent_domain;
- if (members == NULL) {
DEBUG(SSSDBG_TRACE_INTERNAL, "No members\n");return EOK;- }
- tmp_ctx = talloc_new(NULL); if (tmp_ctx == NULL) { DEBUG(SSSDBG_OP_FAILURE, "talloc_new failed.\n");
make sense.
It would be good to log name of group, but it cannot be done in function process_members.
There are possible solutions: * add extra argument just for debug message * return different error code, which will be special cased in calling function (ipa_s2n_save_objects). * add another trace debug message before calling function process_members.
LS