Antonio Perez-Aranda
2010-Nov-15 18:03 UTC
[Dovecot] Trying to building a customized auth plugin
I'm on dovecot 2.0.7 and I trying to building a customized auth plugin. I take passdb-passwd-file.c and userdb-passwd-file.c to try to build with a simple gcc comand out of dovecot environment as in example: export DOVECOT=/path/to/untar/dovecot-2.0.7 gcc -fPIC -shared -g -Wall -I$DOVECOT \ -I$DOVECOT/src/lib \ -I$DOVECOT/src/lib-auth \ -I$DOVECOT/src/lib-sql \ -I$DOVECOT/src/lib-settings \ -I$DOVECOT/src/lib-ntlm \ -I$DOVECOT/src/lib-master \ -I$DOVECOT/src/auth \ passdb-passwd-file.c -o passdb-passwd-file.o With this, I get errors relate with uoff_t Is possible to build this plugin by this way? Another way is patching against one plugin on dovecot RPM, but I prefer this on a separated RPM.
On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote:> gcc -fPIC -shared -g -Wall -I$DOVECOT \ > -I$DOVECOT/src/lib \ > -I$DOVECOT/src/lib-auth \ > -I$DOVECOT/src/lib-sql \ > -I$DOVECOT/src/lib-settings \ > -I$DOVECOT/src/lib-ntlm \ > -I$DOVECOT/src/lib-master \ > -I$DOVECOT/src/auth \ > passdb-passwd-file.c -o passdb-passwd-file.o > > With this, I get errors relate with uoff_tYou need to add -DHAVE_CONFIG_H
Antonio Perez-Aranda
2010-Nov-16 08:11 UTC
[Dovecot] Trying to building a customized auth plugin
gcc -fPIC -shared -g -Wall \ -I$DOVECOT \ -I$DOVECOT/src/lib \ -I$DOVECOT/src/lib-auth \ -I$DOVECOT/src/lib-sql \ -I$DOVECOT/src/lib-settings \ -I$DOVECOT/src/lib-ntlm \ -I$DOVECOT/src/lib-master \ -I$DOVECOT/src/auth \ -DHAVE_CONFIG_H \ -DAUTH_MODULE_DIR=\"passdb-custom\"\ passdb-custom.c -o passdb-custom.o With this I get: error on auth-common.h ... config.h Not found. But config.h are in $DOVECOT path 2010/11/15 Timo Sirainen <tss at iki.fi>:> On 15.11.2010, at 18.03, Antonio Perez-Aranda wrote: > >> gcc -fPIC -shared -g -Wall -I$DOVECOT \ >> ? ? -I$DOVECOT/src/lib \ >> ? ? -I$DOVECOT/src/lib-auth ?\ >> ? ? -I$DOVECOT/src/lib-sql \ >> ? ? -I$DOVECOT/src/lib-settings \ >> ? ? -I$DOVECOT/src/lib-ntlm \ >> ? ? -I$DOVECOT/src/lib-master \ >> ? ? -I$DOVECOT/src/auth \ >> ? ? passdb-passwd-file.c -o passdb-passwd-file.o >> >> With this, I get errors relate with uoff_t > > You need to add -DHAVE_CONFIG_H > >