From d9f5447afbbe7d54f1315e6e2a246fc1a1fce311 Mon Sep 17 00:00:00 2001 From: atheik Date: Sun, 1 May 2022 00:47:54 +0300 Subject: cifs-utils: make GSSAPI usage compatible with Heimdal The gssapi symbols are in gssapi_krb5 and gssapi in MIT and Heimdal Kerberos, respectively. Including gssapi_generic.h is not necessary. Signed-off-by: atheik --- Makefile.am | 2 +- cifs.upcall.c | 1 - configure.ac | 6 ++++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 38babb3..a15392d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,7 +31,7 @@ sbin_PROGRAMS = if CONFIG_CIFSUPCALL sbin_PROGRAMS += cifs.upcall cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c -cifs_upcall_LDADD = -ltalloc -lkeyutils -lgssapi_krb5 $(KRB5_LDADD) $(CAPNG_LDADD) +cifs_upcall_LDADD = -ltalloc -lkeyutils $(GSSAPI_LDADD) $(KRB5_LDADD) $(CAPNG_LDADD) rst_man_pages += cifs.upcall.8 # # Fix the pathnames in manpages. To prevent @label@ being replaced by m4, we diff --git a/cifs.upcall.c b/cifs.upcall.c index bf4eb5d..922d644 100644 --- a/cifs.upcall.c +++ b/cifs.upcall.c @@ -37,7 +37,6 @@ #include #endif -#include #include #include diff --git a/configure.ac b/configure.ac index 2b1aae6..d78b75d 100644 --- a/configure.ac +++ b/configure.ac @@ -208,6 +208,12 @@ if test $enable_cifsupcall != "no"; then [ KRB5_LDADD='-lkrb5' ], AC_MSG_ERROR([no functioning krb5 library found!])) AC_SUBST(KRB5_LDADD) + save_LIBS=$LIBS + AC_SEARCH_LIBS([gss_init_sec_context], [gssapi_krb5 gssapi], + [ GSSAPI_LDADD="$ac_cv_search_gss_init_sec_context" ], + AC_MSG_ERROR([no functioning gssapi library found!])) + LIBS=$save_LIBS + AC_SUBST(GSSAPI_LDADD) fi # checks for wbclient.h and libwbclient.so library -- cgit v1.2.3