On Wed, Jun 09, 1999, Andrea e Luca Giacobazzi wrote:

>   I tryed to add a routine to process a new Apache directory SSLLdap, in
> ssl_engine_config.c:
> 
> const char *ssl_cmd_SSLLdap(
>     cmd_parms *cmd, SSLDirConfigRec *dc, char *arg)
> {
>     SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
>     char *servers, *user, *pwd;
>     FILE *fp;
> 
>     sc->ldapServers = ap_server_root_relative(cmd->pool, arg);
>     fp = fopen("/tmp/prova.log", "w");
>     fprintf(fp, "%s", sc->ldapServers);
>     fflush(fp);
>     fclose(fp);
> return NULL;
> }
> 
> But the thing I miss is where the routines in ssl_engine_config.c are
> invoked and where the directives in httpd.conf are processed. I need to add
> the new one, like that:
> 
> SSLLdap servers="string" user="string" pwd="string"

Every function in ssl_engine_config.c has a hook in mod_ssl.c!
What you need is something like this:

AP_SRV_CMD(Ldap, RAW_ARGS, ....)

Then you get the "server=..." string as one large thing.  You can also try
ITERATE instead of RAW_ARGS, then you get a key=value pair per function call.
I recommend you to look at existing configuration functions or read the
excellent book from L.Stein and D.MacEachern "Writing Apache Modules in Perl
and C". There all those gory details are explained very well.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to