From 893b21387665a7b644355d60f6fbccaf48ffaedb Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 7 Sep 2012 14:14:08 -0400 Subject: Avoid overriding default ccache for ads operations. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid overriding default ccache for ads operations. Nowadays various samba components may need to use GSSAPI and a default cred cache to perform their tasks. This code was completely overriding the whole process default ccache name, thus altering the current credentials and sometimes hijacking them (or getting preemptively hijaked). By using gss_krb5_import_cred we can instead use a private ccache (necessary sometimes to use a different set of credentials fromt he default cifs/fqdn@realm one, for example when contacting foreign DCs using trust credentials) that does not affect the rest of the process. For the kerberos versions which don't have gss_krb5_import_cred we fallback to temp override of KRB5CCNAME and gss_acquire_cred. Signed-off-by: Alexander Bokovoy Signed-off-by: Günther Deschner Autobuild-User(master): Alexander Bokovoy Autobuild-Date(master): Wed Sep 12 21:18:09 CEST 2012 on sn-devel-104 --- source3/include/proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/proto.h') diff --git a/source3/include/proto.h b/source3/include/proto.h index 6dbdf4eae1..b3fa55a914 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -768,7 +768,7 @@ int spnego_gen_krb5_negTokenInit(TALLOC_CTX *ctx, const char *principal, int time_offset, DATA_BLOB *targ, DATA_BLOB *session_key_krb5, uint32 extra_ap_opts, - time_t *expire_time); + const char *ccname, time_t *expire_time); bool spnego_parse_challenge(TALLOC_CTX *ctx, const DATA_BLOB blob, DATA_BLOB *chal1, DATA_BLOB *chal2); DATA_BLOB spnego_gen_auth(TALLOC_CTX *ctx, DATA_BLOB blob); -- cgit