Re: getpwnam with md5 encrypted passwds

2003-11-27 Thread Clifton Royston
On Wed, Nov 26, 2003 at 11:10:01PM -0800, Terry Lambert wrote: > Clifton Royston wrote: > > If you will need to do authentication after your program drops > > privileges, your best course is probably to go through PAM, to install > > a separate daemon which implements a PAM-supported protocol and

Re: getpwnam with md5 encrypted passwds

2003-11-27 Thread Terry Lambert
Peter Pentchev wrote: > On Wed, Nov 26, 2003 at 02:21:04PM +0100, Kai Mosebach wrote: > > Looks interesting ... is this method also usable, when i dropped my privs ? > > I think Terry meant pam_authenticate() (not pan), but to answer your > question: no, when you drop your privileges, you do not h

Re: getpwnam with md5 encrypted passwds

2003-11-27 Thread Terry Lambert
Clifton Royston wrote: > If you will need to do authentication after your program drops > privileges, your best course is probably to go through PAM, to install > a separate daemon which implements a PAM-supported protocol and which > runs with privileges, and then to enable that protocol as a PA

Re: getpwnam with md5 encrypted passwds

2003-11-26 Thread Clifton Royston
On Wed, Nov 26, 2003 at 12:01:01PM -0800, [EMAIL PROTECTED] wrote: > Date: Wed, 26 Nov 2003 16:05:30 +0200 > From: Peter Pentchev <[EMAIL PROTECTED]> > Subject: Re: getpwnam with md5 encrypted passwds > To: Kai Mosebach <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] >

Re: getpwnam with md5 encrypted passwds

2003-11-26 Thread Tim Kientzle
[EMAIL PROTECTED] wrote: Hi, i am trying to validate a given user password against my local passwd-file with this piece of code : if (!strcmp( crypt(pass,pwd->pw_name), pwd->pw_passwd) ) { The second argument to crypt here should be pwd->pw_passwd. Otherwise, this doesn't work even with

Re: getpwnam with md5 encrypted passwds

2003-11-26 Thread Peter Pentchev
On Wed, Nov 26, 2003 at 02:21:04PM +0100, Kai Mosebach wrote: > > -Urspr?ngliche Nachricht- > > Von: Terry Lambert [mailto:[EMAIL PROTECTED] > > Gesendet: Mittwoch, 26. November 2003 13:34 > > An: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Betr

AW: getpwnam with md5 encrypted passwds

2003-11-26 Thread Kai Mosebach
> -Ursprüngliche Nachricht- > Von: Terry Lambert [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 26. November 2003 13:34 > An: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Betreff: Re: getpwnam with md5 encrypted passwds > > "[EMAIL PROTECTED]" wrote: &

Re: getpwnam with md5 encrypted passwds

2003-11-26 Thread Terry Lambert
"[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

Re: getpwnam with md5 encrypted passwds

2003-11-26 Thread [EMAIL PROTECTED]
Zitat von Q <[EMAIL PROTECTED]>: This was a stupid mistake ! Thanks > Change your crypt line to: > > if (!strcmp( crypt(pass,pwd->pw_passwd), pwd->pw_passwd) ) { > > Seeya...Q > > On Wed, 2003-11-26 at 11:30, [EMAIL PROTECTED] wrote: > > > Hi, > > > > i am trying to validate a given user

getpwnam with md5 encrypted passwds

2003-11-25 Thread [EMAIL PROTECTED]
Hi, 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_p