Hello,
I'm trying to get authcustom working, but I'm not really successful.
I'm quite new to the C programming language. I want to authenticate
against several text files, one per domain which is submitted in the
username ([EMAIL PROTECTED]). I wrote some code according to the
comments in authlib/preauthcustom.c. I really tried anything to get it
work, but the POP daemon always denies access using my username and
password. So I've written a dummy auth code hardcoding one user's
login. First I placed this code in do_auth_custom() using the pointer on
struch auth. This didn't work out. So I've placed the same code in
authcustomcommon(), which now looks like this:
--snip--
int authcustomcommon(const char *user, const char *pass,
int (*callback)(struct authinfo *, void *),
void *arg)
{
struct authinfo auth;
int rc;
static uid_t uid;
gid_t gid;
char homedir[100];
char maildir[100];
char fullname[100];
char passwd[100];
uid = 12;
gid = 8;
strcpy(homedir, "/root");
strcpy(maildir, "/var/mail/b-g-j.com/moretti");
strcpy(fullname, "Testuser");
strcpy(passwd, "test");
auth.sysuserid=&uid;
auth.sysgroupid=gid;
auth.homedir=homedir;
auth.maildir=maildir;
auth.address=user;
auth.fullname=fullname;
auth.passwd=passwd;
return ((*callback)(&auth, arg));
}
--
This is really dummy, but it fails using any username and password
test. I'm really at my wits' end. I hope somebody out there is more
experienced in programming custom auth modules and can help me getting a
basic authcustom to work. Thank you.
Markus Gebert
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users