[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-mailutils] [PATCH] Improve GSS-API error logging in imap4d.
From: |
Simon Josefsson |
Subject: |
[bug-mailutils] [PATCH] Improve GSS-API error logging in imap4d. |
Date: |
Wed, 14 Jan 2004 04:45:50 +0100 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
How about this?
Thanks,
Simon
2004-01-14 Simon Josefsson <address@hidden>
* imap4d/auth_gss.c (display_status_1): Improve error logging.
Index: auth_gss.c
===================================================================
RCS file: /cvsroot/mailutils/mailutils/imap4d/auth_gss.c,v
retrieving revision 1.9
diff -u -p -u -w -r1.9 auth_gss.c
--- auth_gss.c 26 May 2003 09:57:45 -0000 1.9
+++ auth_gss.c 14 Jan 2004 03:44:38 -0000
@@ -47,11 +47,23 @@ display_status_1 (char *m, OM_uint32 cod
do
{
maj_stat = gss_display_status (&min_stat, code,
- type, GSS_C_NULL_OID, &msg_ctx, &msg);
- syslog (LOG_ERR, _("GSS-API error %s: %s"), m, (char *) msg.value);
+ type, GSS_C_NO_OID, &msg_ctx, &msg);
+ if (GSS_ERROR (maj_stat))
+ {
+ asprintf ((char**)&msg.value, "code %d", code);
+ msg.length = strlen (msg.value);
+ }
+
+ syslog (LOG_ERR, _("GSS-API error %s (%s): %.*s"),
+ m, type == GSS_C_GSS_CODE ? _("major") : _("minor"),
+ (int) msg.length, (char *) msg.value);
+
+ if (GSS_ERROR (maj_stat))
+ free (msg.value);
+ else
gss_release_buffer (&min_stat, &msg);
}
- while (msg_ctx);
+ while (!GSS_ERROR (maj_stat) && msg_ctx);
}
static void
- [bug-mailutils] [PATCH] Improve GSS-API error logging in imap4d.,
Simon Josefsson <=