httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <>
Subject Re: Problem with directives
Date Thu, 10 Jan 2008 21:02:58 GMT
karim Bendadda wrote:
> *<Location /name_module>
>  url http:\\\myopenldap
>  port 389
>  baseDn someone
> </Location>*

I'm not sure port is the best one to use.  Perhaps something more 
specific to your module, such as MyLDAPPort, or even relying on the 
ldaputil.c settings to set up that information for you.

> *typedef struct mod_name{
>  apr_pool_t    *mpool;
>   const char *url_LDAP;
> ** int num_port;
>  const char *base_dn;
> }mod_name_conf;

It appears that someone's keyboard put in a few extra asterisks on 
that.  I see too many on a num_port line.

> *static const command_rec **name**_cmds[] = {
>     AP_INIT_TAKE1("url**", ap_set_string_slot,
>                   (void*)APR_OFFSETOF(mod_auth_conf, url_LDAP), OR_ALL,
>                   "url of openldap"),
>     AP_INIT_TAKE1("port", ap_set_int_slot,
>                   (void*)APR_OFFSETOF(mod_auth_conf, num_port), OR_ALL,
>                   "port of openldap"),
>     AP_INIT_TAKE1("**baseDn**", ap_set_string_slot,
>                   (void*)APR_OFFSETOF(mod_auth_conf, base_dn), OR_ALL,
>                   "base DN of LDAP"),
>     {NULL}
> };

One - I see WAY too many asterisks.  There should be no asterisks in the 
directive lines.  Please remove them, and choose better directives.

Preface those directives with something more specific, please.  For 
example, if you LDAP module is a translate function that uses LDAP to 
specify which file to retrieve, then you might call the directives 
LDAPTranslateURL, LDAPTranslatePort, and LDAPTranslateBaseDN (this is 
just a set of examples).


View raw message