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 | 05a90a28843e0d69183a49a76617c5f32817df16 (patch) | |
tree | 5f57ab2af8517c0324932fe349e3beba24c1c7e3 /source/libads/ads_struct.c | |
parent | 344b786efe00f72ed81f0eeb4d422c655d866557 (diff) | |
download | samba-05a90a28843e0d69183a49a76617c5f32817df16.tar.gz |
much better ADS error handling system
Diffstat (limited to 'source/libads/ads_struct.c')
-rw-r--r-- | source/libads/ads_struct.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/source/libads/ads_struct.c b/source/libads/ads_struct.c index 83d423104ea..013491eaed1 100644 --- a/source/libads/ads_struct.c +++ b/source/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 -} |