From 8531bd4585f9135ffd4cbb9bb4c880dc77b5adc4 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 5 Jul 2016 12:44:09 +0200 Subject: SYSDB: Upgrade sysdb to use qualified names for users and groups, sudo rules and override objects Runs a sysdb upgrade that changes objects that represent users, groups, sudo rules and overrides to the new schema, which uses the fully qualified names. Reviewed-by: Sumit Bose --- src/db/sysdb_init.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/db/sysdb_init.c') diff --git a/src/db/sysdb_init.c b/src/db/sysdb_init.c index b713a65d3..9e3646bfe 100644 --- a/src/db/sysdb_init.c +++ b/src/db/sysdb_init.c @@ -496,6 +496,13 @@ static errno_t sysdb_domain_cache_upgrade(TALLOC_CTX *mem_ctx, } } + if (strcmp(version, SYSDB_VERSION_0_17) == 0) { + ret = sysdb_upgrade_17(sysdb, upgrade_ctx, &version); + if (ret != EOK) { + goto done; + } + } + ret = EOK; done: sysdb->ldb = save_ldb; @@ -906,6 +913,14 @@ int sysdb_init_ext(TALLOC_CTX *mem_ctx, if (upgrade_ctx) { dom_upgrade_ctx = talloc_zero(tmp_ctx, struct sysdb_dom_upgrade_ctx); + + ret = sss_names_init(tmp_ctx, + upgrade_ctx->cdb, + dom->name, + &dom_upgrade_ctx->names); + if (ret != EOK) { + goto done; + } } else { dom_upgrade_ctx = NULL; } -- cgit