summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-08-28 16:39:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:18 -0500
commit6227abc043c342e70a923da15a12668ca0c87020 (patch)
treea63f4a4748e5d9bbba74f7835730974d060ca0a8
parentd68a5c2718498a36ff3b7bc25ec9f2ebbb19b85d (diff)
downloadsamba-6227abc043c342e70a923da15a12668ca0c87020.tar.gz
samba-6227abc043c342e70a923da15a12668ca0c87020.tar.bz2
samba-6227abc043c342e70a923da15a12668ca0c87020.zip
r24752: Make sure to return properly when the locator is called from within winbindd.
Guenther (This used to be commit 6cf7187e88b4d4c1dfe90fcab459e39a0dbd3a11)
-rw-r--r--source3/libads/smb_krb5_locator.c15
1 files changed, 9 insertions, 6 deletions
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