commit-mailutils
[Top][All Lists]
Advanced

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

[SCM] GNU Mailutils branch, master, updated. rel-2_1-4-g5e2f8ad


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. rel-2_1-4-g5e2f8ad
Date: Thu, 24 Sep 2009 18:00:46 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=5e2f8ad608c9ec774b952bd39b684baabb8e228a

The branch, master has been updated
       via  5e2f8ad608c9ec774b952bd39b684baabb8e228a (commit)
       via  352b446baa6e2e7b8aa29d8aac449aecbf946dab (commit)
       via  bc4fde46c23c4d93268989306bb6b9689e0fe506 (commit)
      from  3f69e162d9849ef1783a662011bf25ca71a1d7a5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5e2f8ad608c9ec774b952bd39b684baabb8e228a
Author: Simon Josefsson <address@hidden>
Date:   Thu Sep 24 20:55:58 2009 +0300

    SASL related fixes.
    
    * imap4d/auth_gsasl.c (auth_gsasl): Make IMAP server wait
    for empty final client response.
    * include/mailutils/gsasl.h (mu_gsasl_stream_create): Don't
    use deprecated GNU SASL types.

commit 352b446baa6e2e7b8aa29d8aac449aecbf946dab
Author: Sergey Poznyakoff <address@hidden>
Date:   Thu Sep 24 20:47:46 2009 +0300

    Implement global transcript settings in imap4d and pop3d.
    
    * imap4d/imap4d.c (imap4d_cfg_param): New global
    statement 'transcript'.
    (imap4d_connection): The transcript parameter overrides
    global imap4d_transcript settings.
    * pop3d/pop3d.c (pop3d_cfg_param, pop3d_connection): Likewise.

commit bc4fde46c23c4d93268989306bb6b9689e0fe506
Author: Sergey Poznyakoff <address@hidden>
Date:   Thu Sep 24 20:38:19 2009 +0300

    Bugfixes
    
    * imap4d/util.c (imap4d_getline): Do not report
    ERR_NO_IFILE if an empty line is read.
    * mailbox/msrv.c (server_section_parser): Catch
    null tags.
    
    Bugs reported by Simon Josefsson.

-----------------------------------------------------------------------

Summary of changes:
 imap4d/auth_gsasl.c       |   15 ++++++++++++---
 imap4d/imap4d.c           |    5 ++++-
 imap4d/util.c             |   14 ++++++--------
 include/mailutils/gsasl.h |    3 +--
 libmu_auth/gsasl.c        |    2 +-
 mailbox/msrv.c            |    2 +-
 pop3d/pop3d.c             |    5 ++++-
 7 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/imap4d/auth_gsasl.c b/imap4d/auth_gsasl.c
index f170f81..d04ba28 100644
--- a/imap4d/auth_gsasl.c
+++ b/imap4d/auth_gsasl.c
@@ -109,10 +109,19 @@ auth_gsasl (struct imap4d_command *command, char 
*auth_type, char **username)
       return RESP_NO;
     }
 
-  /* Some SASL mechanisms output data when GSASL_OK is returned */
+  /* Some SASL mechanisms output additional data when GSASL_OK is
+     returned, and clients must respond with an empty response. */
   if (output[0])
-    util_send ("+ %s\r\n", output);
-  
+    {
+      util_send ("+ %s\r\n", output);
+      imap4d_getline (&input_str, &input_size, &input_len);
+      if (input_len != 0)
+       {
+         mu_diag_output (MU_DIAG_NOTICE, _("non-empty client response"));
+         return RESP_NO;
+       }
+    }
+
   free (output);
 
   if (*username == NULL)
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 55917fa..fe71cfd 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -341,6 +341,8 @@ static struct mu_cfg_param imap4d_cfg_param[] = {
     N_("List of fields to return in response to ID command.") },
   { ".server", mu_cfg_section, NULL, 0, NULL,
     N_("Server configuration.") },
+  { "transcript", mu_cfg_bool, &imap4d_transcript, 0, NULL,
+    N_("Set global transcript mode.") },
   TCP_WRAPPERS_CONFIG
   { NULL }
 };
@@ -473,7 +475,8 @@ imap4d_connection (int fd, struct sockaddr *sa, int salen, 
void *data,
                   mu_ip_server_t srv, time_t timeout, int transcript)
 {
   idle_timeout = timeout;
-  imap4d_transcript = transcript;
+  if (imap4d_transcript != transcript)
+    imap4d_transcript = transcript;
   imap4d_mainloop (fd, fdopen (fd, "r"), fdopen (fd, "w"));
   return 0;
 }
diff --git a/imap4d/util.c b/imap4d/util.c
index 8350de0..ff222ab 100644
--- a/imap4d/util.c
+++ b/imap4d/util.c
@@ -1375,19 +1375,17 @@ imap4d_getline (char **pbuf, size_t *psize, size_t 
*pnbytes)
   if (rc == 0)
     {
       char *s = *pbuf;
-      len = util_trim_nl (s, len);
-      if (imap4d_transcript)
-        {
-          if (len)
-            mu_diag_output (MU_DIAG_DEBUG, "recv: %s", s);
-          else
-            mu_diag_output (MU_DIAG_DEBUG, "got EOF");
-        }
+
       if (len == 0)
         {
+         if (imap4d_transcript)
+            mu_diag_output (MU_DIAG_DEBUG, "got EOF");
           imap4d_bye (ERR_NO_IFILE);
           /*FIXME rc = ECONNABORTED;*/
         }
+      len = util_trim_nl (s, len);
+      if (imap4d_transcript)
+       mu_diag_output (MU_DIAG_DEBUG, "recv: %s", s);
       if (pnbytes)
        *pnbytes = len;
     }
diff --git a/include/mailutils/gsasl.h b/include/mailutils/gsasl.h
index 6067746..ef33f25 100644
--- a/include/mailutils/gsasl.h
+++ b/include/mailutils/gsasl.h
@@ -37,8 +37,7 @@ struct mu_gsasl_module_data mu_gsasl_module_data;
 #include <gsasl.h>
 
 int mu_gsasl_stream_create (mu_stream_t *stream, mu_stream_t transport,
-                           Gsasl_session_ctx *ctx,
-                           int flags);
+                           Gsasl_session *ctx, int flags);
 
 #endif
 
diff --git a/libmu_auth/gsasl.c b/libmu_auth/gsasl.c
index 39e291e..91a9fc7 100644
--- a/libmu_auth/gsasl.c
+++ b/libmu_auth/gsasl.c
@@ -235,7 +235,7 @@ _gsasl_wait (mu_stream_t stream, int *pflags, struct 
timeval *tvp)
 
 int
 mu_gsasl_stream_create (mu_stream_t *stream, mu_stream_t transport,
-                    Gsasl_session *ctx, int flags)
+                       Gsasl_session *ctx, int flags)
 {
   struct _gsasl_stream *s;
   int rc;
diff --git a/mailbox/msrv.c b/mailbox/msrv.c
index a318371..13a85d4 100644
--- a/mailbox/msrv.c
+++ b/mailbox/msrv.c
@@ -970,7 +970,7 @@ server_section_parser (enum mu_cfg_section_stage stage,
     {
     case mu_cfg_section_start:
       {
-       if (node->label->type != MU_CFG_STRING)
+       if (node->label == NULL || node->label->type != MU_CFG_STRING)
          return 1;
        /* FIXME: should not modify 2nd arg, or it should not be const */
        return server_block_begin (tree->debug, node->label->v.string,
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index c1f68be..f77ee9f 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -156,6 +156,8 @@ static struct mu_cfg_param pop3d_cfg_param[] = {
 #endif
   { ".server", mu_cfg_section, NULL, 0, NULL,
     N_("Server configuration.") },
+  { "transcript", mu_cfg_bool, &pop3d_transcript, 0, NULL,
+    N_("Set global transcript mode.") },
   TCP_WRAPPERS_CONFIG
   { NULL }
 };
@@ -379,7 +381,8 @@ pop3d_connection (int fd, struct sockaddr *sa, int salen, 
void *data,
                  mu_ip_server_t srv, time_t timeout, int transcript)
 {
   idle_timeout = timeout;
-  pop3d_transcript = transcript;
+  if (pop3d_transcript != transcript)
+    pop3d_transcript = transcript;
   pop3d_mainloop (fd, fdopen (fd, "r"), fdopen (fd, "w"));
   return 0;
 }


hooks/post-receive
-- 
GNU Mailutils




reply via email to

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