---- nfs-utils-1.0.9/configure.in.orig 2006-07-17 12:23:46.164440000 +0200
-+++ nfs-utils-1.0.9/configure.in 2006-07-18 13:06:53.474440000 +0200
-@@ -164,7 +164,8 @@
- AC_MSG_ERROR([variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
- ]
- )
-- PKG_CHECK_MODULES(GSSAPI, libgssapi >= 0.9)
-+ AC_CHECK_LIB(gssapi, main, [GSSAPI_LIBS="-lgssapi"], [AC_MSG_ERROR([Unable to locate libgssapi])])
-+ AC_SUBST(GSSAPI_LIBS)
- fi
+--- nfs-utils-1.2.3.dist/aclocal/kerberos5.m4~ 2010-09-28 14:24:16.000000000 +0200
++++ nfs-utils-1.2.3.dist/aclocal/kerberos5.m4 2010-10-03 14:13:17.274424855 +0200
+@@ -56,7 +56,11 @@
+ dnl of Heimdal Kerberos on SuSe
+ elif test \( -f $dir/include/heim_err.h -o\
+ -f $dir/include/heimdal/heim_err.h \) -a \
+- -f $dir/lib/libroken.a; then
++ \( -f $dir/lib/libroken.a -o \
++ -f $dir/lib64/libroken.a -o \
++ -f $dir/lib64/libroken.so -o \
++ -f $dir/lib/libroken.so \) ; then
++ K5VERS=`$K5CONFIG --version | head -n 1 | awk '{split($(2),v,"."); if (v@<:@"3"@:>@ == "") v@<:@"3"@:>@ = "0"; print v@<:@"1"@:>@v@<:@"2"@:>@v@<:@"3"@:>@ }'`
+ AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries])
+ KRBDIR="$dir"
+ gssapi_lib=gssapi
+--- nfs-utils-2.3.2/utils/gssd/krb5_util.c.orig 2018-05-22 20:33:01.000000000 +0200
++++ nfs-utils-2.3.2/utils/gssd/krb5_util.c 2018-08-28 17:25:00.834953411 +0200
+@@ -966,9 +966,37 @@
+ {
+ krb5_error_code ret;
+ krb5_creds creds;
+- krb5_cc_cursor cur;
+ int found = 0;
- fi
-diff -ur nfs-utils-1.0.8/utils/gssd/context.c nfs-utils-1.0.8.heimdal/utils/gssd/context.c
---- nfs-utils-1.0.8/utils/gssd/context.c 2006-03-28 02:48:27.000000000 +0200
-+++ nfs-utils-1.0.8.heimdal/utils/gssd/context.c 2006-05-05 20:03:21.000000000 +0200
-@@ -32,7 +32,7 @@
- #include <stdio.h>
- #include <syslog.h>
- #include <string.h>
--#include <gssapi/gssapi.h>
-+#include <gssapi.h>
- #include <rpc/rpc.h>
- #include <rpc/auth_gss.h>
- #include "gss_util.h"
-diff -ur nfs-utils-1.0.8/utils/gssd/context_mit.c nfs-utils-1.0.8.heimdal/utils/gssd/context_mit.c
---- nfs-utils-1.0.8/utils/gssd/context_mit.c 2006-04-10 01:51:59.000000000 +0200
-+++ nfs-utils-1.0.8.heimdal/utils/gssd/context_mit.c 2006-05-05 20:05:28.000000000 +0200
-@@ -32,7 +32,7 @@
- #include <stdio.h>
- #include <syslog.h>
- #include <string.h>
--#include <gssapi/gssapi.h>
-+#include <gssapi.h>
- #include <rpc/rpc.h>
- #include <rpc/auth_gss.h>
- #include "gss_util.h"
-diff -ur nfs-utils-1.0.8/utils/gssd/context_spkm3.c nfs-utils-1.0.8.heimdal/utils/gssd/context_spkm3.c
---- nfs-utils-1.0.8/utils/gssd/context_spkm3.c 2006-04-10 01:51:59.000000000 +0200
-+++ nfs-utils-1.0.8.heimdal/utils/gssd/context_spkm3.c 2006-05-05 20:05:36.000000000 +0200
-@@ -32,7 +32,7 @@
- #include <stdio.h>
- #include <syslog.h>
- #include <string.h>
--#include <gssapi/gssapi.h>
-+#include <gssapi.h>
- #include <rpc/rpc.h>
- #include <rpc/auth_gss.h>
- #include "gss_util.h"
-diff -ur nfs-utils-1.0.8/utils/gssd/gss_oids.c nfs-utils-1.0.8.heimdal/utils/gssd/gss_oids.c
---- nfs-utils-1.0.8/utils/gssd/gss_oids.c 2005-08-26 03:20:13.000000000 +0200
-+++ nfs-utils-1.0.8.heimdal/utils/gssd/gss_oids.c 2006-05-05 20:03:44.000000000 +0200
-@@ -29,7 +29,7 @@
- */
++#ifdef HAVE_HEIMDAL
++ krb5_creds pattern;
++ krb5_const_realm client_realm;
++
++ krb5_cc_clear_mcred(&pattern);
++
++ client_realm = krb5_principal_get_realm (context, principal);
++
++ ret = krb5_make_principal (context, &pattern.server,
++ client_realm, KRB5_TGS_NAME, client_realm,
++ NULL);
++ if (ret)
++ krb5_err (context, 1, ret, "krb5_make_principal");
++ pattern.client = principal;
++
++ ret = krb5_cc_retrieve_cred (context, ccache, 0, &pattern, &creds);
++ krb5_free_principal (context, pattern.server);
++ if (ret) {
++ if (ret == KRB5_CC_END)
++ return 1;
++ krb5_err (context, 1, ret, "krb5_cc_retrieve_cred");
++ }
++
++ found = creds.times.endtime > time(NULL);
++
++ krb5_free_cred_contents (context, &creds);
++#else
++ krb5_cc_cursor cur;
++
+ ret = krb5_cc_start_seq_get(context, ccache, &cur);
+ if (ret)
+ return 0;
+@@ -988,6 +1016,7 @@
+ krb5_free_cred_contents(context, &creds);
+ }
+ krb5_cc_end_seq_get(context, ccache, &cur);
++#endif
- #include <sys/types.h>
--#include <gssapi/gssapi.h>
-+#include <gssapi.h>
-
- /* from kerberos source, gssapi_krb5.c */
- gss_OID_desc krb5oid =
-diff -ur nfs-utils-1.0.8/utils/gssd/gss_util.c nfs-utils-1.0.8.heimdal/utils/gssd/gss_util.c
---- nfs-utils-1.0.8/utils/gssd/gss_util.c 2005-08-26 03:27:18.000000000 +0200
-+++ nfs-utils-1.0.8.heimdal/utils/gssd/gss_util.c 2006-05-05 20:04:08.000000000 +0200
-@@ -72,7 +72,7 @@
- #include <sys/param.h>
- #include <netdb.h>
- #include <fcntl.h>
--#include <gssapi/gssapi.h>
-+#include <gssapi.h>
- #if defined(HAVE_KRB5) && !defined(GSS_C_NT_HOSTBASED_SERVICE)
- #include <gssapi/gssapi_generic.h>
- #define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
-diff -ur nfs-utils-1.0.8/utils/gssd/gssd.h nfs-utils-1.0.8.heimdal/utils/gssd/gssd.h
---- nfs-utils-1.0.8/utils/gssd/gssd.h 2006-03-28 02:50:03.000000000 +0200
-+++ nfs-utils-1.0.8.heimdal/utils/gssd/gssd.h 2006-05-05 20:04:27.000000000 +0200
-@@ -33,7 +33,7 @@
-
- #include <sys/types.h>
- #include <sys/queue.h>
--#include <gssapi/gssapi.h>
-+#include <gssapi.h>
-
- #define MAX_FILE_NAMELEN 32
- #define FD_ALLOC_BLOCK 32
-diff -ur nfs-utils-1.0.8/utils/gssd/gssd_proc.c nfs-utils-1.0.8.heimdal/utils/gssd/gssd_proc.c
---- nfs-utils-1.0.8/utils/gssd/gssd_proc.c 2006-04-10 11:57:20.000000000 +0200
-+++ nfs-utils-1.0.8.heimdal/utils/gssd/gssd_proc.c 2006-05-05 20:04:35.000000000 +0200
-@@ -59,7 +59,7 @@
- #include <signal.h>
- #include <unistd.h>
- #include <errno.h>
--#include <gssapi/gssapi.h>
-+#include <gssapi.h>
- #include <netdb.h>
-
- #include "gssd.h"
-diff -ur nfs-utils-1.0.8/utils/gssd/krb5_util.c nfs-utils-1.0.8.heimdal/utils/gssd/krb5_util.c
---- nfs-utils-1.0.8/utils/gssd/krb5_util.c 2006-03-28 02:50:03.000000000 +0200
-+++ nfs-utils-1.0.8.heimdal/utils/gssd/krb5_util.c 2006-05-05 20:04:53.000000000 +0200
-@@ -107,7 +107,7 @@
- #include <dirent.h>
- #include <errno.h>
- #include <time.h>
--#include <gssapi/gssapi.h>
-+#include <gssapi.h>
- #ifdef USE_PRIVATE_KRB5_FUNCTIONS
- #include <gssapi/gssapi_krb5.h>
+ return found;
+ }
+@@ -1034,6 +1063,9 @@
+ }
+ krb5_free_principal(context, principal);
+ err_princ:
++#ifdef HAVE_HEIMDAL
++#define KRB5_TC_OPENCLOSE 0x00000001
++#endif
+ krb5_cc_set_flags(context, ccache, KRB5_TC_OPENCLOSE);
+ krb5_cc_close(context, ccache);
+ err_cache:
+@@ -1323,7 +1355,7 @@
#endif
-diff -ur nfs-utils-1.0.8/utils/gssd/svcgssd.h nfs-utils-1.0.8.heimdal/utils/gssd/svcgssd.h
---- nfs-utils-1.0.8/utils/gssd/svcgssd.h 2006-03-27 02:30:09.000000000 +0200
-+++ nfs-utils-1.0.8.heimdal/utils/gssd/svcgssd.h 2006-05-05 20:05:02.000000000 +0200
-@@ -33,7 +33,7 @@
-
- #include <sys/types.h>
- #include <sys/queue.h>
--#include <gssapi/gssapi.h>
-+#include <gssapi.h>
-
- void handle_nullreq(FILE *f);
- void gssd_run(void);
+ if (msg != NULL)
+ return msg;
+-#if HAVE_KRB5
++#ifdef HAVE_KRB5
+ return strdup(error_message(code));
+ #else
+ if (context != NULL)