tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: libpam segfault when passwd passes NULL pamh (was Re: gcc -O2 produces invalid object code (x86_64, netbsd-5 branch))



On Mon, Mar 08, 2010 at 03:16:29PM -0500, Richard Hansen wrote:
> There's at least one other way pam_start() can fail:  if you
> misspell the name of a pam module in an /etc/pam.d file.  (Can you
> guess how I originally stumbled across the segfault? :-P)  A "module
> not found" message would be useful.

Yes, but that error is not send down in any meaningful way.

> We could modify pam_start() to set pamh to NULL on error so that
> pam_strerror() does the right thing, or we could do what we're doing
> now and simply ignore pamh in pam_strerror().  See the attached
> patch.

No patch :) I think the problem will remain the same though -- you can't
assume pam_strerror will work after a failing pam_start. It doesn't make
much sense either.

Joerg


Home | Main Index | Thread Index | Old Index