Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6160106

Browse files
committed
Add support for GSSAPI authentication.
Documentation still being written, will be committed later.Henry B. Hotz and Magnus Hagander
1 parentff481ca commit6160106

File tree

17 files changed

+989
-29
lines changed

17 files changed

+989
-29
lines changed

‎configure

Lines changed: 333 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ ac_includes_default="\
314314
# include <unistd.h>
315315
#endif"
316316

317-
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl with_ossp_uuid XML2_CONFIG with_libxml with_libxslt with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
317+
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_gssapi with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl with_ossp_uuid XML2_CONFIG with_libxml with_libxslt with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318318
ac_subst_files=''
319319

320320
# Initialize some variables set by options.
@@ -887,6 +887,7 @@ Optional Packages:
887887
--with-tclconfig=DIR tclConfig.sh is in DIR
888888
--with-perl build Perl modules (PL/Perl)
889889
--with-python build Python modules (PL/Python)
890+
--with-gssapi build with GSSAPI support
890891
--with-krb5 build with Kerberos 5 support
891892
--with-krb-srvnam=NAME default service principal name in Kerberos [postgres]
892893
--with-pam build with PAM support
@@ -3919,6 +3920,50 @@ echo "$as_me:$LINENO: result: $with_python" >&5
39193920
echo "${ECHO_T}$with_python" >&6
39203921

39213922

3923+
#
3924+
# GSSAPI
3925+
#
3926+
echo "$as_me:$LINENO: checking wether to build with GSSAPI support" >&5
3927+
echo $ECHO_N "checking wether to build with GSSAPI support... $ECHO_C" >&6
3928+
3929+
pgac_args="$pgac_args with_gssapi"
3930+
3931+
3932+
# Check whether --with-gssapi or --without-gssapi was given.
3933+
if test "${with_gssapi+set}" = set; then
3934+
withval="$with_gssapi"
3935+
3936+
case $withval in
3937+
yes)
3938+
3939+
3940+
cat >>confdefs.h <<\_ACEOF
3941+
#define ENABLE_GSS 1
3942+
_ACEOF
3943+
3944+
krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3945+
3946+
;;
3947+
no)
3948+
:
3949+
;;
3950+
*)
3951+
{ { echo "$as_me:$LINENO: error: no argument expected for --with-gssapi option" >&5
3952+
echo "$as_me: error: no argument expected for --with-gssapi option" >&2;}
3953+
{ (exit 1); exit 1; }; }
3954+
;;
3955+
esac
3956+
3957+
else
3958+
with_gssapi=no
3959+
3960+
fi;
3961+
3962+
echo "$as_me:$LINENO: result: $with_gssapi" >&5
3963+
echo "${ECHO_T}$with_gssapi" >&6
3964+
3965+
3966+
39223967
#
39233968
# Kerberos 5
39243969
#
@@ -6718,6 +6763,143 @@ echo "$as_me: WARNING:
67186763
*** Not using spinlocks will cause poor performance." >&2;}
67196764
fi
67206765

6766+
if test "$with_gssapi" = yes ; then
6767+
if test "$PORTNAME" != "win32"; then
6768+
echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
6769+
echo $ECHO_N "checking for library containing gss_init_sec_context... $ECHO_C" >&6
6770+
if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
6771+
echo $ECHO_N "(cached) $ECHO_C" >&6
6772+
else
6773+
ac_func_search_save_LIBS=$LIBS
6774+
ac_cv_search_gss_init_sec_context=no
6775+
cat >conftest.$ac_ext <<_ACEOF
6776+
/* confdefs.h. */
6777+
_ACEOF
6778+
cat confdefs.h >>conftest.$ac_ext
6779+
cat >>conftest.$ac_ext <<_ACEOF
6780+
/* end confdefs.h. */
6781+
6782+
/* Override any gcc2 internal prototype to avoid an error. */
6783+
#ifdef __cplusplus
6784+
extern "C"
6785+
#endif
6786+
/* We use char because int might match the return type of a gcc2
6787+
builtin and then its argument prototype would still apply. */
6788+
char gss_init_sec_context ();
6789+
int
6790+
main ()
6791+
{
6792+
gss_init_sec_context ();
6793+
;
6794+
return 0;
6795+
}
6796+
_ACEOF
6797+
rm -f conftest.$ac_objext conftest$ac_exeext
6798+
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6799+
(eval $ac_link) 2>conftest.er1
6800+
ac_status=$?
6801+
grep -v '^ *+' conftest.er1 >conftest.err
6802+
rm -f conftest.er1
6803+
cat conftest.err >&5
6804+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6805+
(exit $ac_status); } &&
6806+
{ ac_try='test -z "$ac_c_werror_flag"
6807+
|| test ! -s conftest.err'
6808+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6809+
(eval $ac_try) 2>&5
6810+
ac_status=$?
6811+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6812+
(exit $ac_status); }; } &&
6813+
{ ac_try='test -s conftest$ac_exeext'
6814+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6815+
(eval $ac_try) 2>&5
6816+
ac_status=$?
6817+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6818+
(exit $ac_status); }; }; then
6819+
ac_cv_search_gss_init_sec_context="none required"
6820+
else
6821+
echo "$as_me: failed program was:" >&5
6822+
sed 's/^/| /' conftest.$ac_ext >&5
6823+
6824+
fi
6825+
rm -f conftest.err conftest.$ac_objext \
6826+
conftest$ac_exeext conftest.$ac_ext
6827+
if test "$ac_cv_search_gss_init_sec_context" = no; then
6828+
for ac_lib in gssapi_krb5; do
6829+
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6830+
cat >conftest.$ac_ext <<_ACEOF
6831+
/* confdefs.h. */
6832+
_ACEOF
6833+
cat confdefs.h >>conftest.$ac_ext
6834+
cat >>conftest.$ac_ext <<_ACEOF
6835+
/* end confdefs.h. */
6836+
6837+
/* Override any gcc2 internal prototype to avoid an error. */
6838+
#ifdef __cplusplus
6839+
extern "C"
6840+
#endif
6841+
/* We use char because int might match the return type of a gcc2
6842+
builtin and then its argument prototype would still apply. */
6843+
char gss_init_sec_context ();
6844+
int
6845+
main ()
6846+
{
6847+
gss_init_sec_context ();
6848+
;
6849+
return 0;
6850+
}
6851+
_ACEOF
6852+
rm -f conftest.$ac_objext conftest$ac_exeext
6853+
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6854+
(eval $ac_link) 2>conftest.er1
6855+
ac_status=$?
6856+
grep -v '^ *+' conftest.er1 >conftest.err
6857+
rm -f conftest.er1
6858+
cat conftest.err >&5
6859+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6860+
(exit $ac_status); } &&
6861+
{ ac_try='test -z "$ac_c_werror_flag"
6862+
|| test ! -s conftest.err'
6863+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6864+
(eval $ac_try) 2>&5
6865+
ac_status=$?
6866+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6867+
(exit $ac_status); }; } &&
6868+
{ ac_try='test -s conftest$ac_exeext'
6869+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6870+
(eval $ac_try) 2>&5
6871+
ac_status=$?
6872+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
6873+
(exit $ac_status); }; }; then
6874+
ac_cv_search_gss_init_sec_context="-l$ac_lib"
6875+
break
6876+
else
6877+
echo "$as_me: failed program was:" >&5
6878+
sed 's/^/| /' conftest.$ac_ext >&5
6879+
6880+
fi
6881+
rm -f conftest.err conftest.$ac_objext \
6882+
conftest$ac_exeext conftest.$ac_ext
6883+
done
6884+
fi
6885+
LIBS=$ac_func_search_save_LIBS
6886+
fi
6887+
echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
6888+
echo "${ECHO_T}$ac_cv_search_gss_init_sec_context" >&6
6889+
if test "$ac_cv_search_gss_init_sec_context" != no; then
6890+
test "$ac_cv_search_gss_init_sec_context" = "none required" || LIBS="$ac_cv_search_gss_init_sec_context $LIBS"
6891+
6892+
else
6893+
{ { echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
6894+
echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
6895+
{ (exit 1); exit 1; }; }
6896+
fi
6897+
6898+
else
6899+
LIBS="$LIBS -lgssapi32"
6900+
fi
6901+
fi
6902+
67216903
if test "$with_krb5" = yes ; then
67226904
if test "$PORTNAME" != "win32"; then
67236905
echo "$as_me:$LINENO: checking for library containing com_err" >&5
@@ -10014,6 +10196,155 @@ Use --without-zlib to disable zlib support." >&2;}
1001410196
fi
1001510197

1001610198

10199+
fi
10200+
10201+
if test "$with_gssapi" = yes ; then
10202+
if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
10203+
echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
10204+
echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
10205+
if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
10206+
echo $ECHO_N "(cached) $ECHO_C" >&6
10207+
fi
10208+
echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
10209+
echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
10210+
else
10211+
# Is the header compilable?
10212+
echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
10213+
echo $ECHO_N "checking gssapi/gssapi.h usability... $ECHO_C" >&6
10214+
cat >conftest.$ac_ext <<_ACEOF
10215+
/* confdefs.h. */
10216+
_ACEOF
10217+
cat confdefs.h >>conftest.$ac_ext
10218+
cat >>conftest.$ac_ext <<_ACEOF
10219+
/* end confdefs.h. */
10220+
$ac_includes_default
10221+
#include <gssapi/gssapi.h>
10222+
_ACEOF
10223+
rm -f conftest.$ac_objext
10224+
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10225+
(eval $ac_compile) 2>conftest.er1
10226+
ac_status=$?
10227+
grep -v '^ *+' conftest.er1 >conftest.err
10228+
rm -f conftest.er1
10229+
cat conftest.err >&5
10230+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
10231+
(exit $ac_status); } &&
10232+
{ ac_try='test -z "$ac_c_werror_flag"
10233+
|| test ! -s conftest.err'
10234+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10235+
(eval $ac_try) 2>&5
10236+
ac_status=$?
10237+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
10238+
(exit $ac_status); }; } &&
10239+
{ ac_try='test -s conftest.$ac_objext'
10240+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10241+
(eval $ac_try) 2>&5
10242+
ac_status=$?
10243+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
10244+
(exit $ac_status); }; }; then
10245+
ac_header_compiler=yes
10246+
else
10247+
echo "$as_me: failed program was:" >&5
10248+
sed 's/^/| /' conftest.$ac_ext >&5
10249+
10250+
ac_header_compiler=no
10251+
fi
10252+
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10253+
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10254+
echo "${ECHO_T}$ac_header_compiler" >&6
10255+
10256+
# Is the header present?
10257+
echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
10258+
echo $ECHO_N "checking gssapi/gssapi.h presence... $ECHO_C" >&6
10259+
cat >conftest.$ac_ext <<_ACEOF
10260+
/* confdefs.h. */
10261+
_ACEOF
10262+
cat confdefs.h >>conftest.$ac_ext
10263+
cat >>conftest.$ac_ext <<_ACEOF
10264+
/* end confdefs.h. */
10265+
#include <gssapi/gssapi.h>
10266+
_ACEOF
10267+
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10268+
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10269+
ac_status=$?
10270+
grep -v '^ *+' conftest.er1 >conftest.err
10271+
rm -f conftest.er1
10272+
cat conftest.err >&5
10273+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
10274+
(exit $ac_status); } >/dev/null; then
10275+
if test -s conftest.err; then
10276+
ac_cpp_err=$ac_c_preproc_warn_flag
10277+
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10278+
else
10279+
ac_cpp_err=
10280+
fi
10281+
else
10282+
ac_cpp_err=yes
10283+
fi
10284+
if test -z "$ac_cpp_err"; then
10285+
ac_header_preproc=yes
10286+
else
10287+
echo "$as_me: failed program was:" >&5
10288+
sed 's/^/| /' conftest.$ac_ext >&5
10289+
10290+
ac_header_preproc=no
10291+
fi
10292+
rm -f conftest.err conftest.$ac_ext
10293+
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10294+
echo "${ECHO_T}$ac_header_preproc" >&6
10295+
10296+
# So? What about this header?
10297+
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10298+
yes:no: )
10299+
{ echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
10300+
echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10301+
{ echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
10302+
echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
10303+
ac_header_preproc=yes
10304+
;;
10305+
no:yes:* )
10306+
{ echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
10307+
echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
10308+
{ echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&5
10309+
echo "$as_me: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&2;}
10310+
{ echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
10311+
echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
10312+
{ echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
10313+
echo "$as_me: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
10314+
{ echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
10315+
echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
10316+
{ echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
10317+
echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
10318+
(
10319+
cat <<\_ASBOX
10320+
## ---------------------------------------- ##
10321+
## Report this to pgsql-bugs@postgresql.org ##
10322+
## ---------------------------------------- ##
10323+
_ASBOX
10324+
) |
10325+
sed "s/^/$as_me: WARNING: /" >&2
10326+
;;
10327+
esac
10328+
echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
10329+
echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
10330+
if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
10331+
echo $ECHO_N "(cached) $ECHO_C" >&6
10332+
else
10333+
ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
10334+
fi
10335+
echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
10336+
echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
10337+
10338+
fi
10339+
if test $ac_cv_header_gssapi_gssapi_h = yes; then
10340+
:
10341+
else
10342+
{ { echo "$as_me:$LINENO: error: header file <gssapi/gssapi.h> is required for GSSAPI" >&5
10343+
echo "$as_me: error: header file <gssapi/gssapi.h> is required for GSSAPI" >&2;}
10344+
{ (exit 1); exit 1; }; }
10345+
fi
10346+
10347+
1001710348
fi
1001810349

1001910350
if test "$with_krb5" = yes ; then
@@ -24618,6 +24949,7 @@ s,@enable_thread_safety@,$enable_thread_safety,;t t
2461824949
s,@with_tcl@,$with_tcl,;t t
2461924950
s,@with_perl@,$with_perl,;t t
2462024951
s,@with_python@,$with_python,;t t
24952+
s,@with_gssapi@,$with_gssapi,;t t
2462124953
s,@with_krb5@,$with_krb5,;t t
2462224954
s,@krb_srvtab@,$krb_srvtab,;t t
2462324955
s,@with_pam@,$with_pam,;t t

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp