httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Constable <ma...@renta.net>
Subject Re: apr_dbd_mysql for apache2.2
Date Mon, 30 Oct 2006 01:27:40 GMT
On Sunday 29 October 2006 22:30, Joachim Zobel wrote:
> Am Sonntag, den 29.10.2006, 14:39 +1000 schrieb Mark Constable:
> > *** glibc detected *** /usr/sbin/httpd: double free or corruption (!prev): 0x08278360
***
> 
> This is often mention as "the dreaded ...". Glibc has from a certain
> version on treatet double free as a fatal error. I remember lots of apps
> on my laptop blew up when debian testing (etch) hit this.
> 
> According to
> 
> http://mail-archives.apache.org/mod_mbox/httpd-bugs/200605.mbox/%
> 3Cbug-39513-7868@http.issues.apache.org/bugzilla/%3E
> 
> setting the env' var' MALLOC_CHECK_=1 or 0 should work around.

Thanks for that hint but it didn't help in this case. When using this
directive apache will start up, and only the process handling a request
to the /home/w/lan/aria/www URL will segfault when accessed...

<Directory /home/w/lan/aria/www>
 AuthType Basic
 AuthName "Aria"
 AuthBasicProvider dbd
 Require valid-user
# AuthDBDUserPWQuery "select pw from passwd where uid = %s"
</Directory>

but when the AuthDBDUserPWQuery line is uncommented then apache dies
on startup much earlier than I would expect, just after opening the
passwd/group files...

open("/etc/group", O_RDONLY)            = 5
fcntl64(5, F_GETFD)                     = 0
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=552, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7214000
read(5, "root:x:0:root\ndaemon:x:1:root,bi"..., 4096) = 552
close(5)                                = 0
munmap(0xb7214000, 4096)                = 0

... segfaults here when AuthDBDUserPWQuery is uncommented.

uname({sys="Linux", node="aria", ...})  = 0
socket(PF_NETLINK, SOCK_RAW, 0)         = 5
bind(5, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(5, {sa_family=AF_NETLINK, pid=12296, groups=00000000}, [12]) = 0
time(NULL)                              = 1162170947
... etc


And FWIW I tried libapache-mod-auth-mysql-4.3.9 (a Debian source
package) but it looks like it would also take quite a bit of work
to get working with apache2.2, if ever...

# make
/usr/sbin/apxs  -o apache2_mod_auth_mysql.la -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
-DAPACHE2 -c mod_auth_mysql.c
/usr/build-1/libtool --silent --mode=compile gcc -prefer-pic -march=i686 -O2 -pipe  -DLINUX=2
-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/usr/include/apache  -I/usr/include/apr-1
  -I/usr/include/apr-1 -I/usr/include -I/usr/include/mysql -I/usr/include/mysql -DAPACHE2
 -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
mod_auth_mysql.c:686: error: expected expression before 'mysql_auth_config_rec'
mod_auth_mysql.c:686: error: initializer element is not constant
mod_auth_mysql.c:686: error: (near initialization for 'mysql_auth_cmds[8].cmd_data')
... etc


Is anyone actually using MySQL(5) for authentication with apache2.2 ?

--markc

Mime
View raw message