[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mutt-dev
Subject:    GSSAPI patch & build patches
From:       Lawrence Greenfield <leg+ () andrew ! cmu ! edu>
Date:       2000-01-24 23:33:48
[Download RAW message or body]

Hi,

The GSSAPI authentication didn't work out of the box for me (against a
Cyrus 1.6.22 server), using a fairly recent snapshot of the MIT krb5
code.  Patch attached.

Also included in the patch is some small changes so the build doesn't
complain if you don't have sgml2html and sgml2text.  These should
probably be improved.

Thanks,
Larry


["mutt-patch" (application/octet-stream)]

diff -u -r mutt-ORIG/doc/Makefile.in mutt/doc/Makefile.in
--- mutt-ORIG/doc/Makefile.in	Thu Nov 11 03:41:27 1999
+++ mutt/doc/Makefile.in	Mon Jan 24 14:34:25 2000
@@ -80,10 +80,10 @@
 	for f in $(topsrcdir_DOCFILES) ; do \
 		$(INSTALL) -m 644 $(top_srcdir)/$$f $(DESTDIR)$(docdir) ; \
 	done
-	$(INSTALL) -m 644 manual.txt $(DESTDIR)$(docdir)
+	$(INSTALL) -m 644 manual.txt $(DESTDIR)$(docdir) || true
 	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir)/html
-	for file in manual*.html ; do	\
-		$(INSTALL) -m 644 $$file $(DESTDIR)$(docdir)/html/	;\
+	for file in manual*.html a ; do	\
+		$(INSTALL) -m 644 $$file $(DESTDIR)$(docdir)/html/ || true ;\
 	done
 
 uninstall:
@@ -93,10 +93,10 @@
 	-rm -rf $(DESTDIR)$(docdir)
 
 manual.txt: manual.sgml
-	sgml2txt -c latin manual
+	sgml2txt -c latin manual || true
 
 manual.html: manual.sgml
-	sgml2html manual
+	sgml2html manual || true
 
 clean: 
 	rm -f *~ *.html *.orig *.rej  stamp-doc-sgml stamp-doc-man
diff -u -r mutt-ORIG/imap/auth.c mutt/imap/auth.c
--- mutt-ORIG/imap/auth.c	Thu Dec  9 06:17:35 1999
+++ mutt/imap/auth.c	Mon Jan 24 16:29:49 2000
@@ -170,9 +170,19 @@
   do
   {
     /* build token */
-    maj_stat = gss_init_sec_context (&min_stat, GSS_C_NO_CREDENTIAL, &context,
-      target_name, NULL, 0, 0, NULL, sec_token, NULL, &send_token,
-      (unsigned int*) &cflags, NULL);
+    maj_stat = gss_init_sec_context (&min_stat, 
+				     GSS_C_NO_CREDENTIAL, 
+				     &context,
+				     target_name, 
+				     GSS_C_NO_OID,
+				     GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG,
+				     0, 
+				     GSS_C_NO_CHANNEL_BINDINGS, 
+				     sec_token, 
+				     NULL, 
+				     &send_token,
+				     (unsigned int*) &cflags, 
+				     NULL);
     if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
     {
       dprint (1, (debugfile, "Error exchanging credentials\n"));
@@ -227,6 +237,7 @@
     dprint (2, (debugfile, "Couldn't unwrap security level data\n"));
     gss_release_buffer (&min_stat, &send_token);
 
+    mutt_socket_write(idata->conn, "*\r\n");
     return -1;
   }
   dprint (2, (debugfile, "Credential exchange complete\n"));
@@ -238,6 +249,7 @@
     dprint (2, (debugfile, "Server requires integrity or privace\n"));
     gss_release_buffer (&min_stat, &send_token);
 
+    mutt_socket_write(idata->conn, "*\r\n");
     return -1;
   }
 
@@ -265,6 +277,7 @@
   {
     dprint (2, (debugfile, "Error creating login request\n"));
 
+    mutt_socket_write(idata->conn, "*\r\n");
     return -1;
   }
 
@@ -278,6 +291,7 @@
   {
     dprint (1, (debugfile, "Error receiving server response.\n"));
 
+    mutt_socket_write(idata->conn, "*\r\n");
     return -1;
   }
   if (imap_code (buf1))


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic