From cd5033e86bb4065d75188e2b6ef287a4421344c8 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 12 Nov 2014 16:30:57 +0100 Subject: views: allow view name change at startup Currently some manual steps are needed on a FreeIPA to switch from one view to another. With this patch the IPA provider checks at startup if the view name changed and does the needed steps automatically. Besides saving the new view name this includes removing the old view data and marking the user and group entries as invalid. Reviewed-by: Jakub Hrozek --- src/db/sysdb_views.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/db') diff --git a/src/db/sysdb_views.c b/src/db/sysdb_views.c index 079e2bbb..8cc279af 100644 --- a/src/db/sysdb_views.c +++ b/src/db/sysdb_views.c @@ -123,17 +123,13 @@ errno_t sysdb_update_view_name(struct sysdb_ctx *sysdb, goto done; } else { /* view name changed */ - /* not supported atm */ - DEBUG(SSSDBG_CRIT_FAILURE, - "View name changed from [%s] to [%s]. NOT SUPPORTED.\n", - tmp_str, view_name); - ret = ENOTSUP; - goto done; + DEBUG(SSSDBG_CONF_SETTINGS, + "View name changed from [%s] to [%s].\n", tmp_str, view_name); } + } else { + add_view_name = true; } - add_view_name = true; - msg = ldb_msg_new(tmp_ctx); if (msg == NULL) { DEBUG(SSSDBG_OP_FAILURE, "ldb_msg_new failed.\n"); -- cgit