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/libads/ads_struct.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/libads/ads_struct.c') diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c index 45d00a39a3..fd7e417bad 100644 --- a/source3/libads/ads_struct.c +++ b/source3/libads/ads_struct.c @@ -201,6 +201,7 @@ void ads_destroy(ADS_STRUCT **ads) SAFE_FREE((*ads)->auth.password); SAFE_FREE((*ads)->auth.user_name); SAFE_FREE((*ads)->auth.kdc_server); + SAFE_FREE((*ads)->auth.ccache_name); SAFE_FREE((*ads)->config.realm); SAFE_FREE((*ads)->config.bind_path); -- cgit