summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorAmitKumar <amitkuma@redhat.com>2017-07-24 20:15:13 +0530
committerLukas Slebodnik <lslebodn@redhat.com>2017-09-25 14:33:06 +0200
commitc33fa33065b1211dba5ea2909bac62843a72e8b5 (patch)
tree136bb7ef2b70dcb3ae95d73c32493c1837a43a37 /src/responder
parent1f331476e7d33bb03cc35a2a9064ee1cc5bed6cf (diff)
downloadsssd-c33fa33065b1211dba5ea2909bac62843a72e8b5.tar.gz
sssd-c33fa33065b1211dba5ea2909bac62843a72e8b5.tar.xz
sssd-c33fa33065b1211dba5ea2909bac62843a72e8b5.zip
Print a warning when enumeration is requested but disabled
Add an explanatory message to be logged once, at the start-up, mentioning that in case enumeration is not enabled, getent passwd won't return all users by design. The debug level chosen to show the message is SSS_LOG_NOTICE. Resolves: https://pagure.io/SSSD/sssd/issue/2301 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/common/cache_req/cache_req.c6
-rw-r--r--src/responder/common/responder.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/responder/common/cache_req/cache_req.c b/src/responder/common/cache_req/cache_req.c
index 2f2c3e97f..abcb9cba3 100644
--- a/src/responder/common/cache_req/cache_req.c
+++ b/src/responder/common/cache_req/cache_req.c
@@ -176,6 +176,12 @@ cache_req_validate_domain_enumeration(struct cache_req *cr,
if (domain->enumerate == false) {
CACHE_REQ_DEBUG(SSSDBG_TRACE_FUNC, cr, "Domain %s does not support "
"enumeration, skipping...\n", domain->name);
+ if (cr->rctx->enumeration_warn_logged == false) {
+ sss_log(SSS_LOG_NOTICE, "Enumeration requested but not enabled\n");
+ CACHE_REQ_DEBUG(SSSDBG_TRACE_FUNC, cr,
+ "Enumeration requested but not enabled\n");
+ cr->rctx->enumeration_warn_logged = true;
+ }
return false;
}
diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h
index a97476ca7..9a57df558 100644
--- a/src/responder/common/responder.h
+++ b/src/responder/common/responder.h
@@ -157,6 +157,7 @@ struct resp_ctx {
bool socket_activated;
bool dbus_activated;
bool cache_first;
+ bool enumeration_warn_logged;
};
struct cli_creds;