author | Neng Xue <neng.xue@oracle.com> |
Mon, 26 Sep 2016 15:58:55 -0700 | |
changeset 6978 | 14cbeb78966a |
parent 6599 | 1d033832c5e7 |
permissions | -rw-r--r-- |
6303
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
1 |
# |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
2 |
# This patch fixes an issue where gss_store_cred(), when called with |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
3 |
# overwrite_creds is 1, is not overwriting the ccache file which causes |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
4 |
# problems when trying to get service tickets and there is an expired tgt cred |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
5 |
# in that ccache. |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
6 |
# |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
7 |
# This problem has been reported to MIT via this ticket: 8010 gss_store_cred |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
8 |
# should initialize ccache and work with collections |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
9 |
# |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
10 |
# Patch source: in-house |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
11 |
# |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
12 |
|
6599
1d033832c5e7
24377741 Update Userland krb5 to MIT 1.14.3
Shawn Emery <shawn.emery@oracle.com>
parents:
6303
diff
changeset
|
13 |
--- a/src/lib/gssapi/krb5/store_cred.c |
1d033832c5e7
24377741 Update Userland krb5 to MIT 1.14.3
Shawn Emery <shawn.emery@oracle.com>
parents:
6303
diff
changeset
|
14 |
+++ b/src/lib/gssapi/krb5/store_cred.c |
1d033832c5e7
24377741 Update Userland krb5 to MIT 1.14.3
Shawn Emery <shawn.emery@oracle.com>
parents:
6303
diff
changeset
|
15 |
@@ -143,6 +143,15 @@ copy_initiator_creds(OM_uint32 *minor_status, |
6303
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
16 |
major_status = GSS_S_FAILURE; |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
17 |
goto cleanup; |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
18 |
} |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
19 |
+ if (overwrite_cred) { |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
20 |
+ code = krb5_cc_initialize(context, ccache, |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
21 |
+ kcred->name->princ); |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
22 |
+ if (code != 0) { |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
23 |
+ *minor_status = code; |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
24 |
+ major_status = GSS_S_CRED_UNAVAIL; |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
25 |
+ goto cleanup; |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
26 |
+ } |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
27 |
+ } |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
28 |
} |
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
29 |
|
f5e952fa0abd
23587748 The overwrite arg to gss_store_cred() is not respected
Will Fiveash <will.fiveash@oracle.com>
parents:
diff
changeset
|
30 |
code = krb5_cc_copy_creds(context, kcred->ccache, ccache); |