nmh-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] nmh ChangeLog mts/smtp/smtp.c


From: Peter Maydell
Subject: [Nmh-commits] nmh ChangeLog mts/smtp/smtp.c
Date: Wed, 30 Apr 2008 18:47:03 +0000

CVSROOT:        /cvsroot/nmh
Module name:    nmh
Changes by:     Peter Maydell <pm215>   08/04/30 18:47:03

Modified files:
        .              : ChangeLog 
        mts/smtp       : smtp.c 

Log message:
        Provide SASL_CB_AUTHNAME callback (avoids problem with wrong username
        being sent in some situations)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/ChangeLog?cvsroot=nmh&r1=1.261&r2=1.262
http://cvs.savannah.gnu.org/viewcvs/nmh/mts/smtp/smtp.c?cvsroot=nmh&r1=1.23&r2=1.24

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/nmh/nmh/ChangeLog,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -b -r1.261 -r1.262
--- ChangeLog   29 Apr 2008 21:05:30 -0000      1.261
+++ ChangeLog   30 Apr 2008 18:47:02 -0000      1.262
@@ -1,3 +1,10 @@
+2008-04-30  Peter Maydell  <address@hidden>
+
+       * mts/smtp/smtp.c: provide a callback for SASL_CB_AUTHNAME
+       (fixes issue with SASL sending the wrong username in some
+       circumstances). Thanks to <address@hidden>
+       for the patch.
+
 2008-04-29  Peter Maydell  <address@hidden>
 
        * Revert previous attempt at fix for SASL issue as it

Index: mts/smtp/smtp.c
===================================================================
RCS file: /cvsroot/nmh/nmh/mts/smtp/smtp.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- mts/smtp/smtp.c     29 Apr 2008 21:05:30 -0000      1.23
+++ mts/smtp/smtp.c     30 Apr 2008 18:47:02 -0000      1.24
@@ -1,7 +1,7 @@
 /*
  * smtp.c -- nmh SMTP interface
  *
- * $Id: smtp.c,v 1.23 2008/04/29 21:05:30 pm215 Exp $
+ * $Id: smtp.c,v 1.24 2008/04/30 18:47:02 pm215 Exp $
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -105,6 +105,8 @@
 #define SM_SASL_N_CB_USER 0
     { SASL_CB_PASS, sm_get_pass, NULL },
 #define SM_SASL_N_CB_PASS 1
+    { SASL_CB_AUTHNAME, sm_get_user, NULL },
+#define SM_SASL_N_CB_AUTHNAME 2
     { SASL_CB_LIST_END, NULL, NULL },
 };
 #endif /* CYRUS_SASL */
@@ -1084,6 +1086,7 @@
        user = getusername();
 
     callbacks[SM_SASL_N_CB_USER].context = user;
+    callbacks[SM_SASL_N_CB_AUTHNAME].context = user;
 
     /*
      * This is a _bit_ of a hack ... but if the hostname wasn't supplied
@@ -1293,7 +1296,7 @@
 {
     char *user = (char *) context;
 
-    if (! result || id != SASL_CB_USER)
+    if (! result || ((id != SASL_CB_USER) && (id != SASL_CB_AUTHNAME)))
        return SASL_BADPARAM;
 
     *result = user;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]