c399daf6d0
pam_end() already contains a NULL check, and it is not unreasonable to call it with a NULL pamh in a cleanup / error-handling situation. Remove OPENPAM_NONNULL, which may cause gcc to optimize away the NULL check. This fixes a potential NULL pointer dereference in error-handling code in passwd(1).
OpenPAM is an open source PAM library that focuses on simplicity, correctness, and cleanliness. OpenPAM aims to gather the best features of Solaris PAM, XSSO and Linux-PAM, plus some innovations of its own. In areas where these implementations disagree, OpenPAM tries to remain compatible with Solaris, at the expense of XSSO conformance and Linux-PAM compatibility. These are some of OpenPAM's features: - Implements the complete PAM API as described in the original PAM paper and in OSF-RFC 86.0; this corresponds to the full XSSO API except for mappings and secondary authentication. Also implements some extensions found in Solaris 9. - Extends the API with several useful and time-saving functions. - Performs strict checking of return values from service modules. - Reads configuration from /etc/pam.d/, /etc/pam.conf, /usr/local/etc/pam.d/ and /usr/local/etc/pam.conf, in that order; this will be made configurable in a future release. Please direct bug reports and inquiries to des@freebsd.org. $Id: README 320 2006-02-16 20:33:19Z des $