1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

PAM authentication:

> pam_strerror() should be used a few more times, rather than just saying
> "Error!".  Also, the configure.in snippet seems wrong.  You add
> -I$pam_prefix/include/security to $INCLUDES and then you #include
> <security/pam_appl.h>.  This whole thing is probably unnecessary, since
> PAM is a system library on the systems where it exists, so the headers
> and libraries are found automatically, unlike OpenSSL and
> Kerberos.

See attached revised patch. (I'm sure the configure.in stuff can be done
right/better, I'm just not enough of a autoconf guru to know what to
change it to.)

Dominic J. Eidson
This commit is contained in:
Bruce Momjian
2001-09-06 03:23:38 +00:00
parent 2a34134b6c
commit 04c1f72920
7 changed files with 290 additions and 17 deletions

View File

@ -432,7 +432,6 @@ PGAC_ARG_BOOL(with, perl, no, [ --with-perl build Perl interface an
AC_MSG_RESULT([$with_perl])
AC_SUBST(with_perl)
#
# Optionally build Python interface module
#
@ -529,6 +528,23 @@ AC_DEFINE_UNQUOTED([PG_KRB_SRVNAM], ["$with_krb_srvnam"],
[The name of the PostgreSQL service principal in Kerberos])
#
# PAM
#
AC_MSG_CHECKING([whether to build with PAM support])
PGAC_ARG_OPTARG(with, pam,
[ --with-pam[=DIR] build with PAM support [/usr]],
[pam_prefix=/usr],
[pam_prefix=$withval],
[
AC_MSG_RESULT([yes])
AC_DEFINE([USE_PAM], 1, [Define to build with PAM support])
],
[AC_MSG_RESULT(no)])
AC_SUBST(with_pam)
#
# OpenSSL
@ -752,11 +768,14 @@ if test "$with_openssl" = yes ; then
AC_CHECK_LIB(ssl, [SSL_library_init], [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
fi
if test "$with_pam" = yes ; then
AC_CHECK_LIB(pam, [pam_start], [], [AC_MSG_ERROR([library 'pam' is required for PAM])])
fi
if test "$enable_nls" = yes ; then
PGAC_CHECK_GETTEXT
fi
##
## Header files
##
@ -794,6 +813,10 @@ if test "$with_openssl" = yes ; then
AC_CHECK_HEADER([openssl/err.h], [], [AC_MSG_ERROR([header file <openssl/err.h> is required for OpenSSL])])
fi
if test "$with_pam" = yes ; then
AC_CHECK_HEADER([security/pam_appl.h], [], [AC_MSG_ERROR([header file <security/pam_appl.h> is required for PAM])])
fi
##
## Types, structures, compiler characteristics