Commit 65a513c2 authored by Magnus Hagander's avatar Magnus Hagander

Support GSSAPI builds where the header is <gssapi.h> and not <gssapi/gssapi.h>,

such as OpenBSD (possibly all Heimdal).

Stefan Kaltenbrunner
parent 67719940
This diff is collapsed.
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.519 2007/07/12 14:10:39 mha Exp $ dnl $PostgreSQL: pgsql/configure.in,v 1.520 2007/07/12 14:36:52 mha Exp $
dnl dnl
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
...@@ -767,8 +767,8 @@ fi ...@@ -767,8 +767,8 @@ fi
if test "$with_gssapi" = yes ; then if test "$with_gssapi" = yes ; then
if test "$PORTNAME" != "win32"; then if test "$PORTNAME" != "win32"; then
AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5], [], AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 'gssapi -lkrb5 -lcrypto'], [],
[AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])]) [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
else else
LIBS="$LIBS -lgssapi32" LIBS="$LIBS -lgssapi32"
fi fi
...@@ -870,7 +870,8 @@ Use --without-zlib to disable zlib support.])]) ...@@ -870,7 +870,8 @@ Use --without-zlib to disable zlib support.])])
fi fi
if test "$with_gssapi" = yes ; then if test "$with_gssapi" = yes ; then
AC_CHECK_HEADER(gssapi/gssapi.h, [], [AC_MSG_ERROR([header file <gssapi/gssapi.h> is required for GSSAPI])]) AC_CHECK_HEADERS(gssapi/gssapi.h, [],
[AC_CHECK_HEADERS(gssapi.h, [], [AC_MSG_ERROR([gssapi.h header file is required for GSSAPI])])])
fi fi
if test "$with_krb5" = yes ; then if test "$with_krb5" = yes ; then
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.150 2007/07/11 08:27:33 mha Exp $ * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.151 2007/07/12 14:36:52 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -302,7 +302,11 @@ pg_krb5_recvauth(Port *port) ...@@ -302,7 +302,11 @@ pg_krb5_recvauth(Port *port)
*---------------------------------------------------------------- *----------------------------------------------------------------
*/ */
#if defined(HAVE_GSSAPI_H)
#include <gssapi.h>
#else
#include <gssapi/gssapi.h> #include <gssapi/gssapi.h>
#endif
#ifdef WIN32 #ifdef WIN32
/* /*
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.59 2007/07/10 13:14:21 mha Exp $ * $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.60 2007/07/12 14:36:52 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -30,8 +30,12 @@ ...@@ -30,8 +30,12 @@
#endif #endif
#ifdef ENABLE_GSS #ifdef ENABLE_GSS
#if defined(HAVE_GSSAPI_H)
#include <gssapi.h>
#else
#include <gssapi/gssapi.h> #include <gssapi/gssapi.h>
#endif #endif
#endif
#include "libpq/hba.h" #include "libpq/hba.h"
#include "libpq/pqcomm.h" #include "libpq/pqcomm.h"
......
...@@ -172,6 +172,12 @@ ...@@ -172,6 +172,12 @@
/* Define to 1 if you have the `getrusage' function. */ /* Define to 1 if you have the `getrusage' function. */
#undef HAVE_GETRUSAGE #undef HAVE_GETRUSAGE
/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
#undef HAVE_GSSAPI_GSSAPI_H
/* Define to 1 if you have the <gssapi.h> header file. */
#undef HAVE_GSSAPI_H
/* Define to 1 if you have the <history.h> header file. */ /* Define to 1 if you have the <history.h> header file. */
#undef HAVE_HISTORY_H #undef HAVE_HISTORY_H
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes). * exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.125 2007/07/12 14:10:39 mha Exp $ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.126 2007/07/12 14:36:52 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -329,7 +329,11 @@ pg_krb5_sendauth(char *PQerrormsg, int sock, const char *hostname, const char *s ...@@ -329,7 +329,11 @@ pg_krb5_sendauth(char *PQerrormsg, int sock, const char *hostname, const char *s
/* /*
* GSSAPI authentication system. * GSSAPI authentication system.
*/ */
#if defined(HAVE_GSSAPI_H)
#include <gssapi.h>
#else
#include <gssapi/gssapi.h> #include <gssapi/gssapi.h>
#endif
#ifdef WIN32 #ifdef WIN32
/* /*
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.122 2007/07/10 13:14:22 mha Exp $ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.123 2007/07/12 14:36:52 mha Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -45,8 +45,12 @@ ...@@ -45,8 +45,12 @@
#include "pqexpbuffer.h" #include "pqexpbuffer.h"
#ifdef ENABLE_GSS #ifdef ENABLE_GSS
#if defined(HAVE_GSSAPI_H)
#include <gssapi.h>
#else
#include <gssapi/gssapi.h> #include <gssapi/gssapi.h>
#endif #endif
#endif
#ifdef USE_SSL #ifdef USE_SSL
#include <openssl/ssl.h> #include <openssl/ssl.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment