On Mon, Feb 18, 2002 at 05:08:52PM +0100, Prune wrote:
[ auth-ldap stuff ]
I've been workin on integrating this-- there are a couple
of things I'm not happy with in the existing code, for
instance the use of fixed-length buffers, which I'm
changing, but in the meantime, I have a couple of
questions:
- Firstly, can you give me some example data against
which the plugin should be able to authenticate (in
LDIF format or whatever). I'm not very familiar with
LDAP and it's not quite clear to me what the code is
expecting to find in the directory.
my test user is :
/* auth_mysql_new_user_pass */
authcontext auth_mysql_new_user_pass(const char *user, const char *pass, const char *host /* unused */) {
authcontext a = NULL;
char *local_part = NULL;
const char *domain;
char *filter = NULL;
[...]
/* we split the login and the domain from the email style login given by the user */
domain = user + strcspn(user, "@%!");
if (domain == user || !*domain) return NULL;
++domain;
local_part = xmalloc(domain - user);
if (!local_part) return NULL;
memset(local_part, 0, domain - user);
strncpy(local_part, user, domain - user - 1);
- Secondly, you never use the domain in constructing the
query against the directory. How do you specify the
existence of accounts in more than one domain?
you're right.