Hello,
I am trying to develop a password_scheme for the Django passwords.
After building and installing the module in
$module_dir/auth/password/djangopass.so, also tried libdjangopass.so and
libdjangopass_plugin.so, Dovecot does not recognize the scheme:
doveadm pw -l
CRYPT MD5 MD5-CRYPT SHA SHA1 SHA256 SHA512 SMD5 SSHA SSHA256 SSHA512 PLAIN
CLEARTEXT CRAM-MD5 HMAC-MD5 DIGEST-MD5 PLAIN-MD4 PLAIN-MD5 LDAP-MD5 LANMAN
NTLM OTP SKEY RPA SHA256-CRYPT SHA512-CRYPT
Please can you help me?
Thanks
--
Jordi Llonch
# 2.0.15: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.40.3-0.fc15.x86_64 x86_64 Fedora release 15 (Lovelock) ext4
----------password-scheme-django.c--------------------------
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <dovecot/lib.h>
#include <dovecot/hex-binary.h>
#include <dovecot/password-scheme.h>
#define uchar unsigned char
static bool djangopass_verify(const char *plaintext, const char *user,
const unsigned char *raw_password, size_t size)
{
return TRUE;
}
void djangopass_generate(const char *plaintext, const char *user,
const unsigned char **raw_password_r, size_t *size_r)
{
}
struct password_scheme djangopass_scheme = {
"DJANGO",
PW_ENCODING_BASE64,
0,
djangopass_verify,
djangopass_generate
};
struct module;
void djangopass_init(struct module *module)
{
password_scheme_register(&djangopass_scheme);
}
void djangopass_deinit(void)
{
password_scheme_unregister(&djangopass_scheme);
}
---------------------------------------------------------------------------