From 6227abc043c342e70a923da15a12668ca0c87020 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 28 Aug 2007 16:39:03 +0000 Subject: r24752: Make sure to return properly when the locator is called from within winbindd. Guenther (This used to be commit 6cf7187e88b4d4c1dfe90fcab459e39a0dbd3a11) --- source3/libads/smb_krb5_locator.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source3/libads') diff --git a/source3/libads/smb_krb5_locator.c b/source3/libads/smb_krb5_locator.c index 91ea24b30f..33f2a414d0 100644 --- a/source3/libads/smb_krb5_locator.c +++ b/source3/libads/smb_krb5_locator.c @@ -340,16 +340,12 @@ krb5_error_code smb_krb5_locator_lookup(void *private_data, "failed to query winbindd\n", (unsigned int)getpid()); #endif - -#ifdef KRB5_PLUGIN_NO_HANDLE - return KRB5_PLUGIN_NO_HANDLE; -#else - return KRB5_KDC_UNREACH; /* Heimdal */ -#endif + goto failed; } } else { /* FIXME: here comes code for locator being called from within * winbind */ + goto failed; } #ifdef DEBUG_KRB5 fprintf(stderr, "[%5u]: smb_krb5_locator_lookup: " @@ -367,6 +363,13 @@ krb5_error_code smb_krb5_locator_lookup(void *private_data, SAFE_FREE(kdc_name); return ret; + + failed: +#ifdef KRB5_PLUGIN_NO_HANDLE + return KRB5_PLUGIN_NO_HANDLE; +#else + return KRB5_KDC_UNREACH; /* Heimdal */ +#endif } #ifdef HEIMDAL_KRB5_LOCATE_PLUGIN_H -- cgit