diff options
author | Sumit Bose <sbose@redhat.com> | 2014-11-12 16:30:57 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-11-25 19:38:54 +0100 |
commit | cd5033e86bb4065d75188e2b6ef287a4421344c8 (patch) | |
tree | cb1f7f37664290dc406a222f37de59e7d34df17c /src/db | |
parent | 2fe140d3a41e1ac66400069d35adc9379348c1e5 (diff) | |
download | sssd-cd5033e86bb4065d75188e2b6ef287a4421344c8.tar.gz sssd-cd5033e86bb4065d75188e2b6ef287a4421344c8.tar.xz sssd-cd5033e86bb4065d75188e2b6ef287a4421344c8.zip |
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 <jhrozek@redhat.com>
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/sysdb_views.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/db/sysdb_views.c b/src/db/sysdb_views.c index 079e2bbbf..8cc279af6 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"); |