From e61e52d50460bf2a1c6d35e7d1f63d4392fc940b Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 7 Aug 2013 10:26:07 -0400 Subject: Make notes of our staged nsswitch lookups --- src/back-sch-nss.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/back-sch-nss.c') diff --git a/src/back-sch-nss.c b/src/back-sch-nss.c index 7819513..1d2ec5d 100644 --- a/src/back-sch-nss.c +++ b/src/back-sch-nss.c @@ -465,6 +465,23 @@ repeat: return entries; } +const char * +nsswitch_type_to_name(enum sch_search_nsswitch_t type) +{ + switch (type) { + case SCH_NSSWITCH_USER: + return "user"; + break; + case SCH_NSSWITCH_GROUP: + return "group"; + break; + case SCH_NSSWITCH_NONE: + return "none(?)"; + break; + } + return "(unknown)"; +} + /* Check if the filter is one (like uid=) that should trigger an * nsswitch lookup, and if it is, make a note that we should perform such a * lookup. */ @@ -535,6 +552,12 @@ backend_search_nsswitch(struct backend_set_data *set_data, staged->next = cbdata->staged; cbdata->staged = staged; + + slapi_log_error(SLAPI_LOG_PLUGIN, cbdata->state->plugin_desc->spd_id, + "staged nsswitch %s search for %s/%s/%s\n", + nsswitch_type_to_name(staged->type), + staged->map_group, staged->map_set, + staged->name); return; fail: -- cgit