summaryrefslogtreecommitdiff
path: root/server/db
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-12-09 13:45:43 +0100
committerStephen Gallagher <sgallagh@redhat.com>2009-12-10 17:20:26 -0500
commit307491c0bcb33c3b1f6004f81be5abe3f5ff5814 (patch)
tree602fac370f42855425a24cca17f78dbeca7cb419 /server/db
parent8c7434f8e8e7ddc81c68309c90fa8f3ee98ac3b2 (diff)
downloadsssd-307491c0bcb33c3b1f6004f81be5abe3f5ff5814.tar.gz
sssd-307491c0bcb33c3b1f6004f81be5abe3f5ff5814.tar.bz2
sssd-307491c0bcb33c3b1f6004f81be5abe3f5ff5814.zip
Always update sysdb to the latest version
Diffstat (limited to 'server/db')
-rw-r--r--server/db/sysdb.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/server/db/sysdb.c b/server/db/sysdb.c
index 979acf8b..bd3acc6c 100644
--- a/server/db/sysdb.c
+++ b/server/db/sysdb.c
@@ -1568,6 +1568,7 @@ int sysdb_init(TALLOC_CTX *mem_ctx,
struct sss_domain_info *domains, *dom;
struct sysdb_ctx *ctx;
bool upgrade_02 = false;
+ const char *version = NULL;
int ret;
if (!ev) return EINVAL;
@@ -1636,13 +1637,20 @@ int sysdb_init(TALLOC_CTX *mem_ctx,
ret = sysdb_upgrade_02(cdb, ev, ctx, ctx_list);
if (ret != EOK) {
- DEBUG(0, ("FATAL: Upgrade form db version %d failed!\n",
+ DEBUG(0, ("FATAL: Upgrade form db version %s failed!\n",
SYSDB_VERSION_0_2));
- DEBUG(0, ("You can find a backup of the database here: %s\n",
- backup_file));
+ DEBUG(0, ("You may find a backup of the database here: %s\n",
+ DB_PATH));
talloc_zfree(ctx_list);
return ret;
}
+ ret = sysdb_upgrade_03(ctx, &version);
+ if (ret != EOK) {
+ DEBUG(0, ("FATAL: Upgrade form db version %d failed!\n",
+ SYSDB_VERSION_0_3));
+ talloc_zfree(ctx_list);
+ return ret;
+ };
}
*_ctx_list = ctx_list;