| |
@@ -152,6 +152,12 @@
|
| |
/* nothing to invalidate; no reason to fail */
|
| |
ret = EOK;
|
| |
goto done;
|
| |
+ } else if (ret == ERR_DOMAIN_NOT_FOUND) {
|
| |
+ /* Cannot find domain specified in the parameter --domain.
|
| |
+ * It might be a typo and therefore we will fail.
|
| |
+ */
|
| |
+ ret = ENOENT;
|
| |
+ goto done;
|
| |
} else if (ret != EOK) {
|
| |
DEBUG(SSSDBG_CRIT_FAILURE,
|
| |
"Error initializing context for the application\n");
|
| |
@@ -858,7 +864,7 @@
|
| |
}
|
| |
|
| |
ret = init_domains(ctx, values.domain);
|
| |
- if (ret == ENOENT) {
|
| |
+ if (ret == ENOENT && values.domain == NULL) {
|
| |
/* Nothing to invalidate; do not log confusing messages. */
|
| |
goto fini;
|
| |
} else if (ret != EOK) {
|
| |
@@ -866,6 +872,7 @@
|
| |
ERROR("Could not open domain %1$s. If the domain is a subdomain "
|
| |
"(trusted domain), use fully qualified name instead of "
|
| |
"--domain/-d parameter.\n", values.domain);
|
| |
+ ret = ERR_DOMAIN_NOT_FOUND;
|
| |
} else {
|
| |
ERROR("Could not open available domains\n");
|
| |
}
|
| |
If sss_cache is called with --domain parameter we should fail
in case of unknown domain. It might be a typo and user should know
about such case.
Resolves:
https://pagure.io/SSSD/sssd/issue/3919