diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2009-11-24 21:16:40 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-12-01 15:59:38 -0500 |
commit | 3fc84f21bd715c4cece722231af933a1981bb6e7 (patch) | |
tree | 8fa09c64af1c47616db575b10def6ad1b62f8b49 /server | |
parent | 6a1deabbc1918de34de65595142bbb2895d90ed9 (diff) | |
download | sssd-3fc84f21bd715c4cece722231af933a1981bb6e7.tar.gz sssd-3fc84f21bd715c4cece722231af933a1981bb6e7.tar.xz sssd-3fc84f21bd715c4cece722231af933a1981bb6e7.zip |
Better error message when there is no local domain configured
Fixes: #235
Diffstat (limited to 'server')
-rw-r--r-- | server/tools/sss_groupadd.c | 6 | ||||
-rw-r--r-- | server/tools/sss_groupdel.c | 6 | ||||
-rw-r--r-- | server/tools/sss_groupmod.c | 6 | ||||
-rw-r--r-- | server/tools/sss_useradd.c | 6 | ||||
-rw-r--r-- | server/tools/sss_userdel.c | 6 | ||||
-rw-r--r-- | server/tools/sss_usermod.c | 6 | ||||
-rw-r--r-- | server/tools/tools_util.c | 2 |
7 files changed, 31 insertions, 7 deletions
diff --git a/server/tools/sss_groupadd.c b/server/tools/sss_groupadd.c index 82d4573db..15eed100e 100644 --- a/server/tools/sss_groupadd.c +++ b/server/tools/sss_groupadd.c @@ -82,7 +82,11 @@ int main(int argc, const char **argv) ret = init_sss_tools(&tctx); if (ret != EOK) { DEBUG(1, ("init_sss_tools failed (%d): %s\n", ret, strerror(ret))); - ERROR("Error initializing the tools\n"); + if (ret == ENOENT) { + ERROR("Error initializing the tools - no local domain\n"); + } else { + ERROR("Error initializing the tools\n"); + } ret = EXIT_FAILURE; goto fini; } diff --git a/server/tools/sss_groupdel.c b/server/tools/sss_groupdel.c index 84ea0be41..e5b043e27 100644 --- a/server/tools/sss_groupdel.c +++ b/server/tools/sss_groupdel.c @@ -77,7 +77,11 @@ int main(int argc, const char **argv) ret = init_sss_tools(&tctx); if (ret != EOK) { DEBUG(1, ("init_sss_tools failed (%d): %s\n", ret, strerror(ret))); - ERROR("Error initializing the tools\n"); + if (ret == ENOENT) { + ERROR("Error initializing the tools - no local domain\n"); + } else { + ERROR("Error initializing the tools\n"); + } ret = EXIT_FAILURE; goto fini; } diff --git a/server/tools/sss_groupmod.c b/server/tools/sss_groupmod.c index d3a35988a..b25a018d3 100644 --- a/server/tools/sss_groupmod.c +++ b/server/tools/sss_groupmod.c @@ -107,7 +107,11 @@ int main(int argc, const char **argv) ret = init_sss_tools(&tctx); if (ret != EOK) { DEBUG(1, ("init_sss_tools failed (%d): %s\n", ret, strerror(ret))); - ERROR("Error initializing the tools\n"); + if (ret == ENOENT) { + ERROR("Error initializing the tools - no local domain\n"); + } else { + ERROR("Error initializing the tools\n"); + } ret = EXIT_FAILURE; goto fini; } diff --git a/server/tools/sss_useradd.c b/server/tools/sss_useradd.c index 94de68fd9..077ac99f7 100644 --- a/server/tools/sss_useradd.c +++ b/server/tools/sss_useradd.c @@ -179,7 +179,11 @@ int main(int argc, const char **argv) ret = init_sss_tools(&tctx); if (ret != EOK) { DEBUG(1, ("init_sss_tools failed (%d): %s\n", ret, strerror(ret))); - ERROR("Error initializing the tools\n"); + if (ret == ENOENT) { + ERROR("Error initializing the tools - no local domain\n"); + } else { + ERROR("Error initializing the tools\n"); + } ret = EXIT_FAILURE; goto fini; } diff --git a/server/tools/sss_userdel.c b/server/tools/sss_userdel.c index d34466e74..e84d78b17 100644 --- a/server/tools/sss_userdel.c +++ b/server/tools/sss_userdel.c @@ -98,7 +98,11 @@ int main(int argc, const char **argv) ret = init_sss_tools(&tctx); if (ret != EOK) { DEBUG(1, ("init_sss_tools failed (%d): %s\n", ret, strerror(ret))); - ERROR("Error initializing the tools\n"); + if (ret == ENOENT) { + ERROR("Error initializing the tools - no local domain\n"); + } else { + ERROR("Error initializing the tools\n"); + } ret = EXIT_FAILURE; goto fini; } diff --git a/server/tools/sss_usermod.c b/server/tools/sss_usermod.c index 733f9982e..a272bc55e 100644 --- a/server/tools/sss_usermod.c +++ b/server/tools/sss_usermod.c @@ -122,7 +122,11 @@ int main(int argc, const char **argv) ret = init_sss_tools(&tctx); if (ret != EOK) { DEBUG(1, ("init_sss_tools failed (%d): %s\n", ret, strerror(ret))); - ERROR("Error initializing the tools\n"); + if (ret == ENOENT) { + ERROR("Error initializing the tools - no local domain\n"); + } else { + ERROR("Error initializing the tools\n"); + } ret = EXIT_FAILURE; goto fini; } diff --git a/server/tools/tools_util.c b/server/tools/tools_util.c index bcb8d5c1e..b509ccb26 100644 --- a/server/tools/tools_util.c +++ b/server/tools/tools_util.c @@ -64,7 +64,7 @@ static int setup_db(struct tools_ctx *ctx) ret = confdb_get_domain(ctx->confdb, "local", &ctx->local); if (ret != EOK) { - DEBUG(1, ("Could not get 'local' domain\n")); + DEBUG(1, ("Could not get 'local' domain: [%d] [%s]\n", ret, strerror(ret))); return ret; } |