"[EMAIL PROTECTED]" wrote:
> i am trying to validate a given user password against my local passwd-file with
> this piece of code :
> 
>         if (!( pwd = getpwnam ( user ))) {
>                 log(ERROR,"User %s not known",user);
>                 stat=NOUSER;
>         }
>         if (!strcmp( crypt(pass,pwd->pw_name), pwd->pw_passwd) ) {
>                 log(DEBUG|MISC,"HURRAY : %s authenticated\n", user);
>                 stat = AUTHED;
>                 }

I know you have the fix for the crypt of the wrong field, but the
proper thing to do is probably to use pan_authenticate() so that
you are insensitive to the athentication method being used, rather
than crypting and comparing it yourself.

-- Terry
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to