]>
Commit | Line | Data |
---|---|---|
7aa240b7 JR |
1 | --- nfs-utils-1.2.3.dist/aclocal/kerberos5.m4~ 2010-09-28 14:24:16.000000000 +0200 |
2 | +++ nfs-utils-1.2.3.dist/aclocal/kerberos5.m4 2010-10-03 14:13:17.274424855 +0200 | |
7aa240b7 JR |
3 | @@ -56,7 +56,11 @@ |
4 | dnl of Heimdal Kerberos on SuSe | |
5 | elif test \( -f $dir/include/heim_err.h -o\ | |
6 | -f $dir/include/heimdal/heim_err.h \) -a \ | |
7 | - -f $dir/lib/libroken.a; then | |
8 | + \( -f $dir/lib/libroken.a -o \ | |
9 | + -f $dir/lib64/libroken.a -o \ | |
10 | + -f $dir/lib64/libroken.so -o \ | |
11 | + -f $dir/lib/libroken.so \) ; then | |
12 | + K5VERS=`$K5CONFIG --version | head -n 1 | awk '{split($(2),v,"."); if (v@<:@"3"@:>@ == "") v@<:@"3"@:>@ = "0"; print v@<:@"1"@:>@v@<:@"2"@:>@v@<:@"3"@:>@ }'` | |
13 | AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries]) | |
14 | KRBDIR="$dir" | |
15 | gssapi_lib=gssapi | |
7aa240b7 JR |
16 | --- nfs-utils-1.2.3.dist/utils/gssd/krb5_util.c.orig 2010-09-28 14:24:16.000000000 +0200 |
17 | +++ nfs-utils-1.2.3.dist/utils/gssd/krb5_util.c 2010-10-03 14:33:07.992424854 +0200 | |
7aa240b7 JR |
18 | @@ -927,9 +927,37 @@ |
19 | { | |
20 | krb5_error_code ret; | |
21 | krb5_creds creds; | |
22 | - krb5_cc_cursor cur; | |
23 | int found = 0; | |
24 | ||
25 | +#ifdef HAVE_HEIMDAL | |
26 | + krb5_creds pattern; | |
27 | + krb5_const_realm client_realm; | |
28 | + | |
29 | + krb5_cc_clear_mcred(&pattern); | |
30 | + | |
31 | + client_realm = krb5_principal_get_realm (context, principal); | |
32 | + | |
33 | + ret = krb5_make_principal (context, &pattern.server, | |
34 | + client_realm, KRB5_TGS_NAME, client_realm, | |
35 | + NULL); | |
36 | + if (ret) | |
37 | + krb5_err (context, 1, ret, "krb5_make_principal"); | |
38 | + pattern.client = principal; | |
39 | + | |
40 | + ret = krb5_cc_retrieve_cred (context, ccache, 0, &pattern, &creds); | |
41 | + krb5_free_principal (context, pattern.server); | |
42 | + if (ret) { | |
43 | + if (ret == KRB5_CC_END) | |
44 | + return 1; | |
45 | + krb5_err (context, 1, ret, "krb5_cc_retrieve_cred"); | |
46 | + } | |
47 | + | |
48 | + found = creds.times.endtime > time(NULL); | |
49 | + | |
50 | + krb5_free_cred_contents (context, &creds); | |
51 | +#else | |
52 | + krb5_cc_cursor cur; | |
53 | + | |
54 | ret = krb5_cc_start_seq_get(context, ccache, &cur); | |
55 | if (ret) | |
56 | return 0; | |
57 | @@ -949,6 +977,7 @@ | |
58 | krb5_free_cred_contents(context, &creds); | |
59 | } | |
60 | krb5_cc_end_seq_get(context, ccache, &cur); | |
61 | +#endif | |
62 | ||
63 | return found; | |
64 | } | |
65 | @@ -995,6 +1024,9 @@ | |
66 | } | |
67 | krb5_free_principal(context, principal); | |
68 | err_princ: | |
69 | +#ifdef HAVE_HEIMDAL | |
70 | +#define KRB5_TC_OPENCLOSE 0x00000001 | |
71 | +#endif | |
72 | krb5_cc_set_flags(context, ccache, KRB5_TC_OPENCLOSE); | |
73 | krb5_cc_close(context, ccache); | |
74 | err_cache: |