using hook for client_check_cb
David K. Sayre
dks at lanl.gov
Tue Feb 21 18:46:39 EST 2006
Hello all,
I am new to hybrid, and somewhat new to IRC in general. Let me give a
short background, just in case there is a better solution that I
haven't found yet.
I am working on putting up a local IRC, and I want to have some sort
of authentication. We already have a working authentication system
with token cards. Ideally I would like to use this through kerberos,
or radius. So my initial thought was to hook on client_check_cb, and
use PAM authentication. I got this idea from a posting to the message
board relating to using mysql to authenticate.
So I tried a couple different things, and can verify if you are using
a valid password or not, but I always segfault right after I
authenticate, so I kept cutting down the code, and even this segfaults:
void *pam_auth(va_list args)
{
struct Client *source_p = va_arg(args, struct Client *);
const char *username = va_arg(args, const char *);
return source_p;
}
If I return NULL, it denies access as expected, and doesn't crash. I
am guessing that I am responsible for setting something in the
Client structure that I am not setting. I looked through s_conf.c a
bit, but I was wondering if someone could tell me what I am
responsible for setting, or point me at a simpler example.
Thanks,
David Sayre
Los Alamos Labs.
More information about the hybrid
mailing list