diff options
Diffstat (limited to 'src/back-nis.c')
-rw-r--r-- | src/back-nis.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/back-nis.c b/src/back-nis.c index 834eda3..930bd77 100644 --- a/src/back-nis.c +++ b/src/back-nis.c @@ -881,6 +881,28 @@ backend_entry_get_set_config_entry_filter(void) return NIS_MAP_CONFIGURATION_FILTER; } +/* Warn if a map is empty. */ +void +backend_check_empty(struct plugin_state *state, + const char *group, const char *set) +{ + unsigned int first_key_len, first_value_len; + int first_key_index; + const char *first_id; + char *first_key, *first_value; + bool_t map_secure; + if (!map_first(state, group, set, + &map_secure, + &first_key_len, &first_key, + &first_value_len, &first_value, + &first_id, + &first_key_index)) { + slapi_log_error(SLAPI_LOG_FATAL, state->plugin_desc->spd_id, + "warning: no entries in domain=%s,map=%s\n", + group, set); + } +} + /* Scan for the list of configured domains and maps. */ void backend_startup(struct plugin_state *state) |