aboutsummaryrefslogtreecommitdiff
path: root/lib/ldapmap.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-10-08 23:00:42 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-10-08 23:00:42 +0300
commite2bb02092abe1321c534ad8a6c168b2803245cc5 (patch)
tree080290a3d844cabb433156b17aca805e2260950a /lib/ldapmap.c
parent9b56a5b05db6630a667ad0c9b16ec45a4e52044d (diff)
downloadeclat-e2bb02092abe1321c534ad8a6c168b2803245cc5.tar.gz
eclat-e2bb02092abe1321c534ad8a6c168b2803245cc5.tar.bz2
Improve configuration syntax help.
* grecs: Upgrade. * lib/filemap.c: Revamp configuration routine. Provide configuration syntax help. * lib/gdbmmap.c: Likewamp. * lib/ldapmap.c: Provide configuration syntax help. * lib/libeclat.h (eclat_map_drv) <map_confhelp>: New member. (eclat_map_confhelp): New proto. * lib/map.c (eclat_map_confhelp): New function. * src/config.c (config_help): Call eclat_map_confhelp.
Diffstat (limited to 'lib/ldapmap.c')
-rw-r--r--lib/ldapmap.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/ldapmap.c b/lib/ldapmap.c
index 8d687e4..5ef20cb 100644
--- a/lib/ldapmap.c
+++ b/lib/ldapmap.c
@@ -42,16 +42,6 @@ struct ldap_map {
static void ldap_map_free(int dbg, void *data);
static int
-cb_null(enum grecs_callback_command cmd,
- grecs_locus_t *locus,
- void *varptr,
- grecs_value_t *value,
- void *cb_data)
-{
- return 0;
-}
-
-static int
cb_tls(enum grecs_callback_command cmd,
grecs_locus_t *locus,
void *varptr,
@@ -82,8 +72,7 @@ cb_tls(enum grecs_callback_command cmd,
static char *typestr;
static struct grecs_keyword ldapmap_kw[] = {
- { "type", "arg", "Set map type",
- grecs_type_string, GRECS_DFLT, NULL, 0, cb_null },
+ { "type", "'ldap", "Set map type", grecs_type_null },
{ "uri", "arg",
"Set LDAP URI",
grecs_type_string, GRECS_DFLT,
@@ -168,6 +157,19 @@ ldap_map_config(int dbg, struct grecs_node *node, void *data)
return eclat_map_ok;
}
+static void
+ldap_map_confhelp()
+{
+ static struct grecs_keyword ldapmap_top[] = {
+ { "map", "name: string",
+ "Configuration for an LDAP map",
+ grecs_type_section, GRECS_INAC, NULL, 0, NULL, NULL,
+ ldapmap_kw },
+ { NULL }
+ };
+ grecs_print_statement_array(ldapmap_top, 1, 0, stdout);
+
+}
static void
ldap_map_free(int dbg, void *data)
@@ -630,6 +632,7 @@ struct eclat_map_drv eclat_map_drv_ldap = {
ldap_map_open,
ldap_map_close,
ldap_map_get,
- ldap_map_free
+ ldap_map_free,
+ ldap_map_confhelp
};

Return to:

Send suggestions and report system problems to the System administrator.