2014-01-17 20:24:09 +01:00
|
|
|
--- 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 @@
|
2013-11-21 11:12:25 +01:00
|
|
|
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
|
2014-01-17 20:24:09 +01:00
|
|
|
--- nfs-utils-1.2.3.dist/utils/gssd/krb5_util.c.orig 2010-09-28 14:24:16.000000000 +0200
|
|
|
|
+++ nfs-utils-1.2.3.dist/utils/gssd/krb5_util.c 2010-10-03 14:33:07.992424854 +0200
|
|
|
|
@@ -927,9 +927,37 @@
|
2013-11-21 11:12:25 +01:00
|
|
|
{
|
|
|
|
krb5_error_code ret;
|
|
|
|
krb5_creds creds;
|
|
|
|
- krb5_cc_cursor cur;
|
|
|
|
int found = 0;
|
|
|
|
|
|
|
|
+#ifdef HAVE_HEIMDAL
|
2014-01-17 20:24:09 +01:00
|
|
|
+ krb5_creds pattern;
|
|
|
|
+ krb5_const_realm client_realm;
|
2013-11-21 11:12:25 +01:00
|
|
|
+
|
2014-01-17 20:24:09 +01:00
|
|
|
+ krb5_cc_clear_mcred(&pattern);
|
2013-11-21 11:12:25 +01:00
|
|
|
+
|
2014-01-17 20:24:09 +01:00
|
|
|
+ client_realm = krb5_principal_get_realm (context, principal);
|
2013-11-21 11:12:25 +01:00
|
|
|
+
|
2014-01-17 20:24:09 +01:00
|
|
|
+ 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;
|
2013-11-21 11:12:25 +01:00
|
|
|
+
|
2014-01-17 20:24:09 +01:00
|
|
|
+ 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");
|
|
|
|
+ }
|
2013-11-21 11:12:25 +01:00
|
|
|
+
|
2014-01-17 20:24:09 +01:00
|
|
|
+ found = creds.times.endtime > time(NULL);
|
2013-11-21 11:12:25 +01:00
|
|
|
+
|
2014-01-17 20:24:09 +01:00
|
|
|
+ krb5_free_cred_contents (context, &creds);
|
2013-11-21 11:12:25 +01:00
|
|
|
+#else
|
2014-01-17 20:24:09 +01:00
|
|
|
+ krb5_cc_cursor cur;
|
2013-11-21 11:12:25 +01:00
|
|
|
+
|
|
|
|
ret = krb5_cc_start_seq_get(context, ccache, &cur);
|
|
|
|
if (ret)
|
|
|
|
return 0;
|
2014-01-17 20:24:09 +01:00
|
|
|
@@ -949,6 +977,7 @@
|
2013-11-21 11:12:25 +01:00
|
|
|
krb5_free_cred_contents(context, &creds);
|
|
|
|
}
|
|
|
|
krb5_cc_end_seq_get(context, ccache, &cur);
|
|
|
|
+#endif
|
2014-01-17 20:24:09 +01:00
|
|
|
|
2013-11-21 11:12:25 +01:00
|
|
|
return found;
|
|
|
|
}
|
2014-01-17 20:24:09 +01:00
|
|
|
@@ -995,6 +1024,9 @@
|
2013-11-21 11:12:25 +01:00
|
|
|
}
|
|
|
|
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:
|