[SSSD] [PATCH] Kerberos locator: Include the correct krb5.h header file

Jakub Hrozek jhrozek at redhat.com
Mon May 7 17:30:09 UTC 2012


https://fedorahosted.org/sssd/ticket/1325

A Gentoo user reported configuration and build issues when building the
SSSD with Heimdal. He confirmed that the attached patch (which is a
modified version of his original patch) fixes the problem for him.
-------------- next part --------------
From 501a06b4421dbb097a36d2d07ae50a0d96074f0a Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Mon, 7 May 2012 11:52:34 +0200
Subject: [PATCH] Kerberos locator: Include the correct krb5.h header file

https://fedorahosted.org/sssd/ticket/1325
---
 src/external/krb5.m4                       |   15 +++++++++++++--
 src/krb5_plugin/sssd_krb5_locator_plugin.c |    1 +
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/external/krb5.m4 b/src/external/krb5.m4
index a8707c6e1bd94b2456fe55c25a4776c1c781b5bc..7b29485a365445e6ed5a7473af158092c2bba0d0 100644
--- a/src/external/krb5.m4
+++ b/src/external/krb5.m4
@@ -38,7 +38,12 @@ CFLAGS="$CFLAGS $KRB5_CFLAGS"
 LIBS="$LIBS $KRB5_LIBS"
 AC_CHECK_HEADERS([krb5.h krb5/krb5.h])
 AC_CHECK_TYPES([krb5_ticket_times, krb5_times], [], [],
-               [[#include <krb5.h>]])
+               [ #ifdef HAVE_KRB5_KRB5_H
+                 #include <krb5/krb5.h>
+                 #else
+                 #include <krb5.h>
+                 #endif
+               ])
 AC_CHECK_FUNCS([krb5_get_init_creds_opt_alloc krb5_get_error_message \
                 krb5_free_unparsed_name \
                 krb5_get_init_creds_opt_set_expire_callback \
@@ -69,7 +74,13 @@ AC_ARG_ENABLE([krb5-locator-plugin],
 AC_CHECK_HEADER([krb5/locate_plugin.h],
                 [have_locate_plugin=yes],
                 [have_locate_plugin=no]
-                [AC_MSG_NOTICE([Kerberos locator plugin cannot be build])])
+                [AC_MSG_NOTICE([Kerberos locator plugin cannot be build])],
+                [ #ifdef HAVE_KRB5_KRB5_H
+                  #include <krb5/krb5.h>
+                  #else
+                  #include <krb5.h>
+                  #endif
+                ])
 AM_CONDITIONAL([BUILD_KRB5_LOCATOR_PLUGIN],
                [test x$have_locate_plugin = xyes -a x$build_locator = xyes])
 
diff --git a/src/krb5_plugin/sssd_krb5_locator_plugin.c b/src/krb5_plugin/sssd_krb5_locator_plugin.c
index b8d4e31b654c3961b56b0505209bf45675a63241..8efbf4b06bd5aeab63d0183210b334f6e745c442 100644
--- a/src/krb5_plugin/sssd_krb5_locator_plugin.c
+++ b/src/krb5_plugin/sssd_krb5_locator_plugin.c
@@ -33,6 +33,7 @@
 #include <fcntl.h>
 #include <ctype.h>
 
+#include "util/sss_krb5.h"
 #include <krb5/locate_plugin.h>
 
 #include "providers/krb5/krb5_common.h"
-- 
1.7.7.6



More information about the sssd-devel mailing list