221af5bbd8
* mailutil has three new commands: delete, rename, and prune * IPv6 support now exists for UNIX and W2K * The NNTP driver now supports NNTP SASL and TLS * imapd now supports the LITERAL+ and SASL-IR initial-response extensions * The IMAP driver has some additional checks to reduce the amount of network traffic, including executing "silly searches" (searches of sequence numbers only) locally * The IMAP, POP, SMTP, and NNTP drivers now have diagnostic code to provide better information about servers which violate SASL's empty challenge requirements (e.g. with the PLAIN mechanism). * There is a new mail_fetch_overview_sequence() function which is like mail_fetch_overview() but takes a sequence number string as an argument. There should have been a flags argument and FT_UID bit as in all the other mail_fetch_???() functions but compatibility with the past... :-( * The overview_t callback (from mail_fetch_overview()) now has a fourth argument which contains the message sequence number (as opposed to the UID which is in the second argument). It turned out that some applications were calling mail_msgno() (which can be moderately expensive) to get the sequence number, and c-client already knew it. * Many declarations which are completely internal to a driver have been removed from the driver .h file, and in those cases where there are no external declarations left the .h file has been eliminated entirely. As part of this, the mbox driver routines are now incorporated with the unix driver routines as opposed to being a separate file. The mbox driver still needs to be lunk in order to get the mbox functionality.
57 lines
1.7 KiB
Text
57 lines
1.7 KiB
Text
$NetBSD: patch-al,v 1.5 2004/05/13 18:14:34 adam Exp $
|
|
|
|
--- src/c-client/auth_gss.c.orig 2004-03-15 19:59:22.000000000 +0000
|
|
+++ src/c-client/auth_gss.c
|
|
@@ -18,6 +18,16 @@
|
|
* CPYRIGHT, included with this Distribution.
|
|
*/
|
|
|
|
+#ifdef __NetBSD__
|
|
+/* This is really Heimdal specific, but . . . */
|
|
+#include <gssapi/gssapi.h>
|
|
+#include <krb5/krb5.h>
|
|
+
|
|
+#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
|
|
+#else
|
|
+#include <gssapi/gssapi_generic.h>
|
|
+#include <gssapi/gssapi_krb5.h>
|
|
+#endif
|
|
|
|
long auth_gssapi_valid (void);
|
|
long auth_gssapi_client (authchallenge_t challenger,authrespond_t responder,
|
|
@@ -56,15 +66,32 @@ long auth_gssapi_valid (void)
|
|
OM_uint32 smn;
|
|
gss_buffer_desc buf;
|
|
gss_name_t name;
|
|
+ krb5_context ctx;
|
|
+ krb5_keytab kt;
|
|
+ krb5_kt_cursor csr;
|
|
+
|
|
+ /* make a context */
|
|
+ if (krb5_init_context (&ctx))
|
|
+ return NIL;
|
|
/* make service name */
|
|
sprintf (tmp,"%s@%s",(char *) mail_parameters (NIL,GET_SERVICENAME,NIL),
|
|
mylocalhost ());
|
|
buf.length = strlen (buf.value = tmp);
|
|
/* see if can build a name */
|
|
if (gss_import_name (&smn,&buf,GSS_C_NT_HOSTBASED_SERVICE,&name) !=
|
|
- GSS_S_COMPLETE) return NIL;
|
|
- /* remove server method if no keytab */
|
|
- if (!kerberos_server_valid ()) auth_gss.server = NIL;
|
|
+ GSS_S_COMPLETE) {
|
|
+ krb5_free_context (ctx); /* finished with context */
|
|
+ return NIL;
|
|
+ }
|
|
+
|
|
+ /* get default keytab */
|
|
+ if (!krb5_kt_default (ctx,&kt)) {
|
|
+ /* can do server if have good keytab */
|
|
+ if (!krb5_kt_start_seq_get (ctx,kt,&csr))
|
|
+ auth_gss.server = auth_gssapi_server;
|
|
+ krb5_kt_close (ctx,kt); /* finished with keytab */
|
|
+ }
|
|
+ krb5_free_context (ctx); /* finished with context */
|
|
gss_release_name (&smn,&name);/* finished with name */
|
|
return LONGT;
|
|
}
|