commit-mailutils
[Top][All Lists]
Advanced

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

[SCM] GNU Mailutils branch, master, updated. release-2.2-641-g802150a


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-641-g802150a
Date: Mon, 25 Mar 2013 16:25:55 +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=802150a165325d9d7a2824765c32852afc6e7797

The branch, master has been updated
       via  802150a165325d9d7a2824765c32852afc6e7797 (commit)
      from  d1e34b1a9662b7f76463604c6ec9b584d0bbe696 (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 802150a165325d9d7a2824765c32852afc6e7797
Author: Sergey Poznyakoff <address@hidden>
Date:   Mon Mar 25 18:20:50 2013 +0200

    Do not ask for ESMTP credentials if unable to handle them.
    
    * libproto/mailer/smtp.c (smtp_open): Disable ESTMP AUTH if
    GSASL support is not compiled.
    * libproto/mailer/smtp_auth.c (mu_smtp_auth): If compiled
    without GSASL, don't attempt to obtain user credentials.

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

Summary of changes:
 libproto/mailer/smtp.c      |   12 +++++++++++-
 libproto/mailer/smtp_auth.c |    6 ++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/libproto/mailer/smtp.c b/libproto/mailer/smtp.c
index f8f3dd4..7dea24f 100644
--- a/libproto/mailer/smtp.c
+++ b/libproto/mailer/smtp.c
@@ -134,6 +134,16 @@ smtp_mailer_add_auth_mech (struct _smtp_mailer 
*smtp_mailer, const char *str)
     }
 }
 
+/* FIXME: So far, ESMTP AUTH support is available only if MU is compiled
+   with GNU SASL. Should this change, the define below must be changed
+   as well. See also smtp_auth.c.
+ */
+#ifdef WITH_GSASL
+# define DFLNOAUTH 0
+#else
+# define DFLNOAUTH 1
+#endif
+
 static int
 smtp_open (mu_mailer_t mailer, int flags)
 {
@@ -144,7 +154,7 @@ smtp_open (mu_mailer_t mailer, int flags)
   char **parmv = NULL;
   int tls = 0;
   int nostarttls = 0;
-  int noauth = 0;
+  int noauth = DFLNOAUTH;
 
   rc = mu_url_sget_scheme (mailer->url, &scheme);
   if (rc == 0) 
diff --git a/libproto/mailer/smtp_auth.c b/libproto/mailer/smtp_auth.c
index d015b6c..20db31a 100644
--- a/libproto/mailer/smtp_auth.c
+++ b/libproto/mailer/smtp_auth.c
@@ -112,6 +112,7 @@ mu_smtp_auth (mu_smtp_t smtp)
   if (smtp->state != MU_SMTP_MAIL)
     return MU_ERR_SEQ;
 
+#if defined(WITH_GSASL)
   /* Obtain missing authentication credentials either from the
      URL (when supplied) or from the user ticket file, or by
      asking the user, if anything else fails.
@@ -126,10 +127,11 @@ mu_smtp_auth (mu_smtp_t smtp)
   _mu_smtp_fixup_params (smtp);
   if (!smtp->param[MU_SMTP_PARAM_USERNAME] && !smtp->secret)
     return MU_ERR_AUTH_NO_CRED;
-#if defined(WITH_GSASL)
   return _mu_smtp_gsasl_auth (smtp);
 #else
-  /* FIXME: Provide support for some basic authentication methods */
+  /* FIXME: Provide support for some basic authentication methods.
+     Once done, make sure _mu_smtp_fixup_params is called for this
+     branc as well (though see the fixme above). */
   return ENOSYS;
 #endif
 }


hooks/post-receive
-- 
GNU Mailutils



reply via email to

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