On (20/06/16 14:44), Petr Cech wrote:
>Hi,
>
>there is patch for #3023 attached.
>
>Reason for this patch is explained in commit message.
>
>I am open to discussion. In my opinion we don't need to connect sysdb pointer
>with domain structure because it is not used in other upgrade functions too.
>
>Regards
>
>-- 
>Petr^4 Čech

>From d0cee759147272f33427388af76ea66307e34881 Mon Sep 17 00:00:00 2001
>From: Petr Cech <pc...@redhat.com>
>Date: Mon, 20 Jun 2016 09:19:03 -0300
>Subject: [PATCH] SYSDB: Fixing DB update
>
>Functions sysdb_user_base_dn() and sysdb_group_base_dn() expect
>that struct sss_domain_info contains pointer to struct sysdb_ctx.
>This is not true in case of sysdb_upgrade functions.
>This patch fixes the situation and revert code to the state before
>12a000c8c7c07259e438fb1e992134bdd07d9a30 commit.
>

I didn't test but it make sense.
It would be good to add comment to the code. So it will not be changed
in future (ldb_dn_new_fmt -> sysdb_user_*_dn)

Other alternative might be to "temporary initialize"
dom->sysdb and then set it back to NULL.
Or permanently initialize it sooner if sysdb is not destroyed
after upgrade.

Others might have different ideas/preferences as well.

LS
_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org

Reply via email to