summaryrefslogtreecommitdiff
path: root/source3/libads/ads_struct.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-19 08:44:23 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-19 08:44:23 +0000
commita062e58d9e47f95ac7c66668b3cfe1f72386f6e0 (patch)
treef968f822fae231153347045cd7f673359a1a9a6f /source3/libads/ads_struct.c
parente7da05b7605b4bf09a641095d1be23001f83a487 (diff)
downloadsamba-a062e58d9e47f95ac7c66668b3cfe1f72386f6e0.tar.gz
samba-a062e58d9e47f95ac7c66668b3cfe1f72386f6e0.tar.bz2
samba-a062e58d9e47f95ac7c66668b3cfe1f72386f6e0.zip
- added initial support for trusted domains in winbindd_ads
- gss error code patch from a.bokovoy@sam-solutions.net - better sid dumping in ads_dump - fixed help in wbinfo (This used to be commit ee1c3e1f044b4ef62169ad74c5cac40eef81bfda)
Diffstat (limited to 'source3/libads/ads_struct.c')
-rw-r--r--source3/libads/ads_struct.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index 4b2ab5b40f..a7c8d1a681 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -157,3 +157,29 @@ void ads_destroy(ADS_STRUCT **ads)
}
}
+
+static void ads_display_status_helper(char *m, OM_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;
+ }
+}
+
+void ads_display_status(char * msg, int maj_stat,int min_stat)
+{
+ ads_display_status_helper(msg, maj_stat, GSS_C_GSS_CODE);
+ ads_display_status_helper(msg, min_stat, GSS_C_MECH_CODE);
+}