[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tpop3d-discuss][BUG]: auth_flatfile and local_part weirdness
From: |
Arkadiusz Miskiewicz |
Subject: |
[tpop3d-discuss][BUG]: auth_flatfile and local_part weirdness |
Date: |
Wed, 6 Jun 2007 12:06:04 +0200 |
User-agent: |
PLD Linux KMail/1.9.7 |
Here is the problem:
append-domain: no
auth-pam-enable: no
auth-passwd-enable: no
auth-flatfile-enable: yes
auth-flatfile-passwd-file: somefile
auth-flatfile-mail-user: mail
auth-flatfile-mail-group: mail
mailbox: maildir:/var/mail/$(user)
lowercase-mailbox: yes
strip-domain: no
Now
user logs in as:
login: user
password: securepassword
Now,
/* Do we now have enough information to authenticate using USER/PASS? */
if (!c->a && c->user && c->pass) {
c->a = authcontext_new_user_pass(c->user, NULL, c->domain,
c->pass, c->remote_ip, c->local_ip);
calls
authcontext_new_user_pass()
with local_part being NULL, then the code is trying to find out real
local_part:
l = local_part;
d = domain;
if (!local_part && domain) {
int n;
n = strcspn(user, DOMAIN_SEPARATORS);
if (n > 0 && user[n]) {
x = xstrdup(user);
x[n] = 0;
l = x;
d = l + n + 1;
} else
l = NULL;
}
Unfortunately since user doesn't contain full email address (it's just login)
then local_part (l) is set to NULL and then real authenticator is called:
aa->auth_new_user_pass(user, l, d, pass, clienthost, serverhost)
but flatfile driver has:
if (!local_part) return NULL;
and we end up with every login being failure (even if it's correct) :-(
--
Arkadiusz MiĆkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
- [tpop3d-discuss][BUG]: auth_flatfile and local_part weirdness,
Arkadiusz Miskiewicz <=