New password hashing scheme as plugin
Andreas Meyer
luckyfellow42 at gmail.com
Tue Jul 26 23:08:53 UTC 2016
Hi,
I want to add a new password hashing scheme as plugin and provide it for
the dovecot project, so that it will be included as optional plugin in
future releases.
Yet the plugin compiles fine and the .so file gets created.
My approach is to call the functions password_scheme_register() and
password_scheme_unregister() (src/auth/password-scheme.c) inside the
plugin's _init() and _deinit() functions.
When a client tries to login via imap the log shows an error message:
Error: Couldn't load required plugin
/usr/local/lib/dovecot/lib20_newauth_plugin.so: dlopen() failed:
/usr/local/lib/dovecot/lib20_newauth_plugin.so: undefined symbol:
password_scheme_unregister
That error obviously occurs, because the required lib is not linked into
the plugin.
Now my problem is to understand, whether this approach (via .so file) can
be successful at all and if so, how?
Do I need to link libs into it? Which would that be and how do I specify
them in the Makefile.am?
I assume, I don't need to link a lib, but need to use a hook to register
the new hashing scheme, since the plugin is loaded into an already existing
process, which needs to get extended. If this is true, which hook would
that be and how do I register the new scheme?
Or is there no way to accomplish this via a separated .so plugin? Should I
extend the sources in /src/auth instead? (separat file for the hashing
scheme with preprocessor instructions to include it only on demand)
Thank you very much,
Andreas
More information about the dovecot
mailing list