diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-12-19 12:21:12 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-12-19 12:21:12 +0000 |
commit | 1f31ace6cb771d7bf0b64091fba1d24c466ad4e5 (patch) | |
tree | 2260029015c2737d7d53eb82c2368182fd775098 /source3/libads/ads_struct.c | |
parent | 105fe2a32eccc63f63ddf903278b80fb211f05bf (diff) | |
download | samba-1f31ace6cb771d7bf0b64091fba1d24c466ad4e5.tar.gz samba-1f31ace6cb771d7bf0b64091fba1d24c466ad4e5.tar.bz2 samba-1f31ace6cb771d7bf0b64091fba1d24c466ad4e5.zip |
much better ADS error handling system
(This used to be commit 05a90a28843e0d69183a49a76617c5f32817df16)
Diffstat (limited to 'source3/libads/ads_struct.c')
-rw-r--r-- | source3/libads/ads_struct.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c index 83d423104e..013491eaed 100644 --- a/source3/libads/ads_struct.c +++ b/source3/libads/ads_struct.c @@ -22,6 +22,10 @@ #include "includes.h" +/* return a dn of the form "dc=AA,dc=BB,dc=CC" from a + realm of the form AA.BB.CC + caller must free +*/ char *ads_build_dn(const char *realm) { char *p, *r; @@ -156,33 +160,3 @@ void ads_destroy(ADS_STRUCT **ads) SAFE_FREE(*ads); } } - -#if HAVE_KRB5 -static void ads_display_status_helper(const char *m, uint32 code, int type) -{ - int maj_stat, min_stat; - gss_buffer_desc msg; - int msg_ctx; - - msg_ctx = 0; - while (1) { - maj_stat = gss_display_status(&min_stat, code, - type, GSS_C_NULL_OID, - &msg_ctx, &msg); - DEBUG(1, ("GSS-API error %s: %s\n", m, - (char *)msg.value)); - (void) gss_release_buffer(&min_stat, &msg); - - if (!msg_ctx) - break; - } -} -#endif - -void ads_display_status(const char *msg, int maj_stat,int min_stat) -{ -#if HAVE_KRB5 - ads_display_status_helper(msg, maj_stat, GSS_C_GSS_CODE); - ads_display_status_helper(msg, min_stat, GSS_C_MECH_CODE); -#endif -} |