From bd15fd9da10b7b6970dc4234ce2d6c5115592ee4 Mon Sep 17 00:00:00 2001 From: "roberto@precise64" Date: Sat, 10 Mar 2012 14:30:48 +0100 Subject: [PATCH] fixed ldap support --- ldap.c | 4 ++-- uwsgi.c | 4 ++-- uwsgi.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ldap.c b/ldap.c index bbdecb95..13dba6f0 100644 --- a/ldap.c +++ b/ldap.c @@ -138,7 +138,7 @@ next: return ule; } -void uwsgi_ldap_schema_dump_ldif() { +void uwsgi_opt_ldap_dump_ldif(char *opt, char *foo, void *bar) { int i; int items; @@ -191,7 +191,7 @@ void uwsgi_ldap_schema_dump_ldif() { exit(0); } -void uwsgi_ldap_schema_dump() { +void uwsgi_opt_ldap_dump(char *opt, char *foo, void *bar) { int i; int items; diff --git a/uwsgi.c b/uwsgi.c index 23a028fc..c1bb688a 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -224,8 +224,8 @@ static struct uwsgi_option uwsgi_base_options[] = { #endif #ifdef UWSGI_LDAP {"ldap", required_argument, 0, "load configuration from ldap server", uwsgi_opt_set_str, &uwsgi.ldap, 0}, - //{"ldap-schema", no_argument, 0, "dump uWSGI ldap schema",0}, - //{"ldap-schema-ldif", no_argument, 0, LONG_ARGS_LDAP_SCHEMA_LDIF,0}, + {"ldap-schema", no_argument, 0, "dump uWSGI ldap schema", uwsgi_opt_ldap_dump, NULL, UWSGI_OPT_IMMEDIATE}, + {"ldap-schema-ldif", no_argument, 0, "dump uWSGI ldap schema in ldif format", uwsgi_opt_ldap_dump_ldif, NULL, UWSGI_OPT_IMMEDIATE}, #endif {"weight", required_argument, 0, "weight of the instance (used by clustering/lb/subscriptions)", uwsgi_opt_set_64bit, &uwsgi.weight, 0}, {"auto-weight", required_argument, 0, "set weight of the instance (used by clustering/lb/subscriptions) automatically", uwsgi_opt_true, &uwsgi.auto_weight, 0}, diff --git a/uwsgi.h b/uwsgi.h index 5192f7bd..0f87ddcd 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -2024,8 +2024,8 @@ void uwsgi_sqlite3_config(char *, char *[]); #ifdef UWSGI_LDAP -void uwsgi_ldap_schema_dump(void); -void uwsgi_ldap_schema_dump_ldif(void); +void uwsgi_opt_ldap_dump(char *, char *, void *); +void uwsgi_opt_ldap_dump_ldif(char *, char *, void *); void uwsgi_ldap_config(void); #endif