Re: BUG #5121: Segmentation Fault when using pam w/ krb5 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5121: Segmentation Fault when using pam w/ krb5
Date
Msg-id 7812.1255711040@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5121: Segmentation Fault when using pam w/ krb5  ("Ryan Douglas" <rdouglas@arbinet.com>)
List pgsql-bugs
"Douglas, Ryan" <RDouglas@arbinet.com> writes:
> I added some logging statements in the pam_passwd_conv_proc function and
> it gets as far as checking if the password is null then returning
> PAM_CONV_ERR.

That's what I would expect to happen if you don't use -W in psql.
What I suspect is happening with the MS KDC is that an additional
call to the conv_proc happens later with some parameter values that
we aren't prepared for.  Can you stick some debugging printout
into the checks at the very top of the routine?

>                 if (passwd == NULL)
>                                         ereport(LOG,(errmsg("RD - passwd
> is NULL... returning PAM_CONV_ERR")));
>                         return PAM_CONV_ERR;    /* client didn't want to
> send password */

I think you need to add some braces if you don't want to break the
behavior here.  This is C not Python ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: David Fetter
Date:
Subject: Re: BUG #5123: bug in window function "last_value"
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #5122: Subqueries - inner select statement bug