httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jouni Mäkeläinen <>
Subject VS: ap_auth_type() -question
Date Mon, 23 Feb 2009 12:41:40 GMT
>>    if (!encrypted_sso_str || apr_strnatcmp(encrypted_sso_str, "false") == 
>> 0) {
>>        if (apr_strnatcasecmp(ap_auth_type(r), "auth_xxx") == 0) {
> NULL != ap_auth_type(r)?
Code is supposed to test, if the required auth type matches (set with AuthType directive)
with the auth type ("auth_xxx") that module handles. Now ap_auth_type(r) seems to return pointer
to memory location, that causes segmentation fault when accessed (for example in sprintf("Auth
type: %s", ap_auth_type(r)).

>> *** Segmentation fault *** (ap_auth_type)
>> Here is the backtrace from the core dump:
>> #0  0x00002af41b58b67f in apr_match_glob () from /usr/lib64/
>> #1  0x00002af4249ebb74 in authenticate_user (r=0x2af42ed75488) at 
>> mod_auth_xxx.c:159

> Are you sure this debuger was looking at the runtime binaries?   Do
> you call apr_match_glob elsewhere?
I compiled module with following command:
/usr/sbin/apxs -Wcg -lmcrypt -c mod_auth_tek.c

After that I produced backtrace with following commands (did it couple of times because of
the apr_match_glob at the bottom):
gdb /usr/sbin/httpd -c /tmp/core.12451
(gdb) bt

I don't call apr_match_glob() directly, but assumed that ap_auth_type(r) call caused the execution
of the glob function. 

> You might try building with --enable-maintainer-mode
Thanks for the hint. I'll try it next, if nothing else turns up. 


View raw message