diff options
author | Günther Deschner <gd@samba.org> | 2007-08-29 10:12:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:19 -0500 |
commit | 60fb367fd94c19889ec4909b23c3e21dcda2e7d5 (patch) | |
tree | a0b83d78dc62e112f43748c57938b01fe1d40a5b /source3/libads | |
parent | e9cea3e2d822cc32de6c50644c6d307587fcd63b (diff) | |
download | samba-60fb367fd94c19889ec4909b23c3e21dcda2e7d5.tar.gz samba-60fb367fd94c19889ec4909b23c3e21dcda2e7d5.tar.bz2 samba-60fb367fd94c19889ec4909b23c3e21dcda2e7d5.zip |
r24769: Merge error handling for locator plugin.
Guenther
(This used to be commit b83626676ca37437e62b826923fbd1d985eb7ce6)
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/smb_krb5_locator.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/source3/libads/smb_krb5_locator.c b/source3/libads/smb_krb5_locator.c index 33f2a414d0..5f90c71a2b 100644 --- a/source3/libads/smb_krb5_locator.c +++ b/source3/libads/smb_krb5_locator.c @@ -24,10 +24,14 @@ #endif #if defined(HAVE_KRB5) && defined(HAVE_KRB5_LOCATE_PLUGIN_H) -BOOL winbind_env_set( void ); +BOOL winbind_env_set(void); #include <krb5/locate_plugin.h> +#ifndef KRB5_PLUGIN_NO_HANDLE +#define KRB5_PLUGIN_NO_HANDLE KRB5_KDC_UNREACH /* Heimdal */ +#endif + static const char *get_service_from_locate_service_type(enum locate_service_type svc) { switch (svc) { @@ -123,11 +127,7 @@ static int smb_krb5_locator_lookup_sanity_check(enum locate_service_type svc, break; case locate_service_kadmin: case locate_service_krb524: -#ifdef KRB5_PLUGIN_NO_HANDLE return KRB5_PLUGIN_NO_HANDLE; -#else - return KRB5_KDC_UNREACH; /* Heimdal */ -#endif default: return EINVAL; } @@ -137,11 +137,7 @@ static int smb_krb5_locator_lookup_sanity_check(enum locate_service_type svc, case AF_INET: break; case AF_INET6: /* not yet */ -#ifdef KRB5_PLUGIN_NO_HANDLE return KRB5_PLUGIN_NO_HANDLE; -#else - return KRB5_KDC_UNREACH; /* Heimdal */ -#endif default: return EINVAL; } @@ -198,11 +194,7 @@ static krb5_error_code smb_krb5_locator_call_cbfunc(const char *name, (unsigned int)getpid(), gai_strerror(ret), ret); #endif -#ifdef KRB5_PLUGIN_NO_HANDLE return KRB5_PLUGIN_NO_HANDLE; -#else - return KRB5_KDC_UNREACH; /* Heimdal */ -#endif } ret = cbfunc(cbdata, out->ai_socktype, out->ai_addr); @@ -365,11 +357,7 @@ krb5_error_code smb_krb5_locator_lookup(void *private_data, 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 |