Unix Technical Forum

GSSAPI support on OpenBSD

This is a discussion on GSSAPI support on OpenBSD within the Pgsql Patches forums, part of the PostgreSQL category; --> The just commited GSSAPI patch is unable to find the required libraries and includes on OpenBSD (which are in ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:22 AM
Stefan Kaltenbrunner
 
Posts: n/a
Default GSSAPI support on OpenBSD

The just commited GSSAPI patch is unable to find the required libraries
and includes on OpenBSD (which are in /usr/include/kerberosV/) - the
attached patch allows building with gssapi support on OpenBSD 4.0/amd64
(and still seems to build fine on Debian Etch/x86_64).
Note that the patch does not include the derived filess o one needs to
make sure they are getting regenerated before commit.


Stefan

Index: configure.in
================================================== =================
RCS file: /projects/cvsroot/pgsql/configure.in,v
retrieving revision 1.518
diff -c -r1.518 configure.in
*** configure.in 10 Jul 2007 16:41:01 -0000 1.518
--- configure.in 11 Jul 2007 12:58:09 -0000
***************
*** 767,774 ****

if test "$with_gssapi" = yes ; then
if test "$PORTNAME" != "win32"; then
! AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5], [],
! [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
else
LIBS="$LIBS -lgssapi32"
fi
--- 767,774 ----

if test "$with_gssapi" = yes ; then
if test "$PORTNAME" != "win32"; then
! 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])])
else
LIBS="$LIBS -lgssapi32"
fi
***************
*** 870,876 ****
fi

if test "$with_gssapi" = yes ; then
! AC_CHECK_HEADER(gssapi/gssapi.h, [], [AC_MSG_ERROR([header file <gssapi/gssapi.h> is required for GSSAPI])])
fi

if test "$with_krb5" = yes ; then
--- 870,877 ----
fi

if test "$with_gssapi" = yes ; then
! AC_CHECK_HEADERS(gssapi/gssapi.h, [],
! [AC_CHECK_HEADERS(gssapi.h, [], [AC_MSG_ERROR([gssapi.h header file is required for GSSAPI])])])
fi

if test "$with_krb5" = yes ; then
Index: src/backend/libpq/auth.c
================================================== =================
RCS file: /projects/cvsroot/pgsql/src/backend/libpq/auth.c,v
retrieving revision 1.150
diff -c -r1.150 auth.c
*** src/backend/libpq/auth.c 11 Jul 2007 08:27:33 -0000 1.150
--- src/backend/libpq/auth.c 11 Jul 2007 12:58:09 -0000
***************
*** 302,308 ****
--- 302,312 ----
*----------------------------------------------------------------
*/

+ #if defined(HAVE_GSSAPI_H)
+ #include <gssapi.h>
+ #else
#include <gssapi/gssapi.h>
+ #endif

#ifdef WIN32
/*
Index: src/include/libpq/libpq-be.h
================================================== =================
RCS file: /projects/cvsroot/pgsql/src/include/libpq/libpq-be.h,v
retrieving revision 1.59
diff -c -r1.59 libpq-be.h
*** src/include/libpq/libpq-be.h 10 Jul 2007 13:14:21 -0000 1.59
--- src/include/libpq/libpq-be.h 11 Jul 2007 12:58:10 -0000
***************
*** 30,37 ****
--- 30,41 ----
#endif

#ifdef ENABLE_GSS
+ #if defined(HAVE_GSSAPI_H)
+ #include <gssapi.h>
+ #else
#include <gssapi/gssapi.h>
#endif
+ #endif

#include "libpq/hba.h"
#include "libpq/pqcomm.h"
Index: src/interfaces/libpq/fe-auth.c
================================================== =================
RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v
retrieving revision 1.124
diff -c -r1.124 fe-auth.c
*** src/interfaces/libpq/fe-auth.c 10 Jul 2007 13:14:21 -0000 1.124
--- src/interfaces/libpq/fe-auth.c 11 Jul 2007 12:58:10 -0000
***************
*** 317,323 ****
--- 317,327 ----
/*
* GSSAPI authentication system.
*/
+ #if defined(HAVE_GSSAPI_H)
+ #include <gssapi.h>
+ #else
#include <gssapi/gssapi.h>
+ #endif

#ifdef WIN32
/*
Index: src/interfaces/libpq/libpq-int.h
================================================== =================
RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/libpq-int.h,v
retrieving revision 1.122
diff -c -r1.122 libpq-int.h
*** src/interfaces/libpq/libpq-int.h 10 Jul 2007 13:14:22 -0000 1.122
--- src/interfaces/libpq/libpq-int.h 11 Jul 2007 12:58:10 -0000
***************
*** 45,52 ****
--- 45,56 ----
#include "pqexpbuffer.h"

#ifdef ENABLE_GSS
+ #if defined(HAVE_GSSAPI_H)
+ #include <gssapi.h>
+ #else
#include <gssapi/gssapi.h>
#endif
+ #endif

#ifdef USE_SSL
#include <openssl/ssl.h>


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 11:22 AM
Magnus Hagander
 
Posts: n/a
Default Re: GSSAPI support on OpenBSD

On Wed, Jul 11, 2007 at 03:42:01PM +0200, Stefan Kaltenbrunner wrote:
> The just commited GSSAPI patch is unable to find the required libraries
> and includes on OpenBSD (which are in /usr/include/kerberosV/) - the
> attached patch allows building with gssapi support on OpenBSD 4.0/amd64
> (and still seems to build fine on Debian Etch/x86_64).
> Note that the patch does not include the derived filess o one needs to
> make sure they are getting regenerated before commit.


The patch in general looks fine to me. Can someone with more autoconf-fu
comment on if the used autoconf method is correct? Thanks!

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 11:22 AM
Magnus Hagander
 
Posts: n/a
Default Re: GSSAPI support on OpenBSD

On Wed, Jul 11, 2007 at 03:42:01PM +0200, Stefan Kaltenbrunner wrote:
> The just commited GSSAPI patch is unable to find the required libraries
> and includes on OpenBSD (which are in /usr/include/kerberosV/) - the
> attached patch allows building with gssapi support on OpenBSD 4.0/amd64
> (and still seems to build fine on Debian Etch/x86_64).
> Note that the patch does not include the derived filess o one needs to
> make sure they are getting regenerated before commit.


Applied, thanks.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:40 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com