From 4c9a85ab708ec7debecad51e4240e04d8bc6ca4e Mon Sep 17 00:00:00 2001 From: Ondrej Kos Date: Thu, 8 Nov 2012 14:34:36 +0100 Subject: Display more information on DB version mismatch https://fedorahosted.org/sssd/ticket/1589 Added check for determining, whether database version is higher or lower than expected. To distinguish it from other errors it uses following retun values (further used for appropriate error message): EMEDIUMTYPE for lower version than expected EUCLEAN for higher version than expected When SSSD or one of it's tools fails on DB version mismatch, new error message is showed suggesting how to proceed. --- src/tools/sss_cache.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tools/sss_cache.c') diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c index 06b0099dc..368b1df9d 100644 --- a/src/tools/sss_cache.c +++ b/src/tools/sss_cache.c @@ -339,6 +339,7 @@ errno_t init_domains(struct cache_tool_ctx *ctx, const char *domain) ret = sysdb_init_domain_and_sysdb(ctx, ctx->confdb, domain, DB_PATH, &ctx->domains, &db_ctx); if (ret != EOK) { + SYSDB_VERSION_ERROR(ret); DEBUG(1, ("Could not initialize connection to the sysdb\n")); goto fail; } @@ -350,6 +351,7 @@ errno_t init_domains(struct cache_tool_ctx *ctx, const char *domain) } } else { ret = sysdb_init(ctx, ctx->confdb, NULL, false, &ctx->sysdb_list); + SYSDB_VERSION_ERROR(ret); if (ret != EOK) { DEBUG(1, ("Could not initialize connection to the sysdb\n")); goto fail; -- cgit