httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arturo 'Buanzo' Busleiman <bua...@buanzo.com.ar>
Subject module SIGSEGV's on config
Date Sat, 26 May 2007 00:10:37 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi group!

I have this code that manages my modules configuration. The three declared directives should
go in
global or virtualhost (not at Directory, etc).

typedef struct {
    int bEnabled;
    char *KeyServer;
    char *ImportKeyUrl;
} AuthOpenPGPConfig;

static void *create_auth_openpgp_server_config(apr_pool_t *p, server_rec *s) {
AuthOpenPGPConfig *pConfig = apr_palloc(p, sizeof (AuthOpenPGPConfig));

pConfig->bEnabled = 0;
pConfig->KeyServer = apr_pstrdup(p,"hkp://subkeys.pgp.net");
pConfig->ImportKeyUrl = NULL;
return pConfig;
}

static const command_rec auth_openpgp_cmds[] = {
    AP_INIT_FLAG("OpenPGPEngine", ap_set_flag_slot,
    (void *)APR_OFFSETOF(AuthOpenPGPConfig,bEnabled), RSRC_CONF,
    "Enable OpenPGP Auth on this host"),
    AP_INIT_TAKE1("OpenPGPKeyServer",ap_set_string_slot,
    (void *) APR_OFFSETOF(AuthOpenPGPConfig,KeyServer), RSRC_CONF,
    "Specify which keyserver to use for public key imports. Default: hkp://subkeys.pgp.net"),
    AP_INIT_TAKE1("OpenPGPImportKeyUrl",ap_set_string_slot,
    (void *)APR_OFFSETOF(AuthOpenPGPConfig,ImportKeyUrl),RSRC_CONF,
    "Specify full URL where the mao_ImportKey handler is accessed from."),
    { NULL }
};

If I set all/any of those in my VirtualHost container, apache segfaults.

I've just double-chcked with Nick Kew's book, and with some modules' source, but it all seems
OK to
me. Any ideas?

- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
OpenPGP for HTTP: New Web-Auth Scheme: http://freshmeat.net/articles/view/2599
Consulting and Secure Mail Hosting: http://www.buanzo.com.ar/pro/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGV3r9AlpOsGhXcE0RCjnNAKCDCNnoMd3vN3Pl5NWdo/yoJR9czACfacJq
d4eW2Ws2u3aLu3ZMd1TH1Kk=
=fNuU
-----END PGP SIGNATURE-----

Mime
View raw message