[Dovecot] More informations on mysql bug
/bin/sh ../../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -Wall
-W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
-Wchar-subscripts -Wformat=2 -Wbad-function-cast
-I/usr/kerberos/include -o dovecot-auth auth.o auth-cache.o
auth-client-connection.o auth-master-connection.o auth-master-listener.o
auth-module.o auth-request.o auth-request-handler.o auth-stream.o
auth-worker-client.o auth-worker-server.o db-ldap.o db-sql.o
db-passwd-file.o main.o mech.o mech-anonymous.o mech-plain.o
mech-login.o mech-cram-md5.o mech-digest-md5.o mech-ntlm.o mech-rpa.o
mech-apop.o passdb.o passdb-blocking.o passdb-bsdauth.o passdb-cache.o
passdb-ldap.o passdb-passwd.o passdb-passwd-file.o passdb-pam.o
passdb-checkpassword.o passdb-shadow.o passdb-vpopmail.o passdb-sql.o
userdb.o userdb-blocking.o userdb-ldap.o userdb-passwd.o
userdb-passwd-file.o userdb-prefetch.o userdb-static.o userdb-vpopmail.o
userdb-sql.o libpassword.a ../lib-settings/libsettings.a
../lib-ntlm/libntlm.a ../lib-sql/libsql.a ../lib/liblib.a -lcrypt
-lpam -L/usr/local/mysql/lib/mysql -lmysqlclient -lz -export-dynamic -ldl
gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
-Wbad-function-cast -I/usr/kerberos/include -o dovecot-auth auth.o
auth-cache.o auth-client-connection.o auth-master-connection.o
auth-master-listener.o auth-module.o auth-request.o
auth-request-handler.o auth-stream.o auth-worker-client.o
auth-worker-server.o db-ldap.o db-sql.o db-passwd-file.o main.o mech.o
mech-anonymous.o mech-plain.o mech-login.o mech-cram-md5.o
mech-digest-md5.o mech-ntlm.o mech-rpa.o mech-apop.o passdb.o
passdb-blocking.o passdb-bsdauth.o passdb-cache.o passdb-ldap.o
passdb-passwd.o passdb-passwd-file.o passdb-pam.o passdb-checkpassword.o
passdb-shadow.o passdb-vpopmail.o passdb-sql.o userdb.o
userdb-blocking.o userdb-ldap.o userdb-passwd.o userdb-passwd-file.o
userdb-prefetch.o userdb-static.o userdb-vpopmail.o userdb-sql.o
-Wl,--export-dynamic libpassword.a ../lib-settings/libsettings.a
../lib-ntlm/libntlm.a ../lib-sql/libsql.a ../lib/liblib.a -lcrypt -lpam
-L/usr/local/mysql/lib/mysql
/usr/local/mysql/lib/mysql/libmysqlclient.so -lz -ldl
The problem is with dovecot-auth. I modify the program main.c:
#include "/usr/local/mysql/include/mysql/mysql.h" #include <stdio.h> #include "common.h" #include "buffer.h" #include "ioloop.h" #include "network.h" #include "lib-signals.h" #include "restrict-access.h" #include "fd-close-on-exec.h" #include "randgen.h" #include "password-scheme.h" #include "mech.h" #include "auth.h" #include "auth-request-handler.h" #include "auth-worker-server.h" #include "auth-worker-client.h" #include "auth-master-interface.h" #include "auth-master-listener.h" #include "auth-master-connection.h" #include "auth-client-connection.h"
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <syslog.h> #include <pwd.h> #include <grp.h> #include <sys/stat.h>
struct ioloop *ioloop; int standalone = FALSE, worker = FALSE; time_t process_start_time;
static struct auth *auth; static struct auth_worker_client *worker_client;
main() { MYSQL *h;
h = mysql_init (NULL); if (h == NULL) { fprintf (stderr, "mysql_init() failed (probably out of memory)\n"); exit(1); }
if (mysql_real_connect ( h, /* pointer to connection handler */ "localhost", /* host to connect to */ "lyra", /* user name */ "teSIVIkY", /* password */ "lyra", /* database to use */ 0, /* port (use default) */ NULL, /* socket (use default) */ 0) /* flags (none) */ == NULL) {
fprintf (stderr, "mysql_real_connect() failed:\nError %u (%s)\n",
mysql_errno (h), mysql_error (h));
exit (1);
} }
This program is working outsine of dovecot. So its one of the library or the compilation itself that cause the problem of access denied.
Any idea???
Thanks
participants (1)
-
Pierre Laplante