git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
Cc: gitster@pobox.com, git@vger.kernel.org, peff@peff.net
Subject: Re: [PATCH v4] send-email: auth plain/login fix
Date: Thu, 29 Sep 2011 08:01:14 -0700	[thread overview]
Message-ID: <1317308474.1854.8.camel@Joe-Laptop> (raw)
In-Reply-To: <20110929141616.GU10763@in.waw.pl>

On Thu, 2011-09-29 at 16:16 +0200, Zbigniew Jędrzejewski-Szmek wrote:
> git send-email was not authenticating properly when communicating over
> TLS with a server supporting only AUTH PLAIN and AUTH LOGIN. This is
> e.g. the standard server setup under debian with exim4 and probably
> everywhere where system accounts are used.
> 
> The problem (only?) exists when libauthen-sasl-cyrus-perl
> (Authen::SASL::Cyrus) is installed. Importing Authen::SASL::Perl
> makes Authen::SASL use the perl implementation which works
> better.
[]
> diff --git a/git-send-email.perl b/git-send-email.perl
[]
> @@ -1098,6 +1098,10 @@ X-Mailer: git-send-email $gitversion
>  		}
>  
>  		if (defined $smtp_authuser) {
> +			eval {
> +				require Authen::SASL;
> +				Authen::SASL->import(qw(Perl));
> +			};

Thanks for keeping at this.

One comment:

This is a workaround for a nominal defect.

As such, I think the code should be commented
to note why it exists.

How about adding a comment like:

 		if (defined $smtp_authuser) {
			# Workaround AUTH PLAIN/LOGIN interaction defect
			# with Authen::SASL::Cyrus
			eval {
				require Authen::SASL;

  reply	other threads:[~2011-09-29 15:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-06  0:40 [PATCH] git-send-email: Add AUTH LOGIN support Joe Perches
2011-08-06  4:54 ` Junio C Hamano
2011-08-06  5:21   ` Joe Perches
2011-08-19  1:16     ` Joe Perches
2011-08-19 23:09       ` Junio C Hamano
2011-08-19 23:24         ` Joe Perches
2011-08-20  1:01           ` Junio C Hamano
2011-09-24 15:49   ` [PATCH] send-email: auth plain/login fix Zbigniew Jędrzejewski-Szmek
2011-09-26 16:38     ` Junio C Hamano
2011-09-26 16:59       ` Joe Perches
2011-09-26 17:24     ` Jakub Narebski
2011-09-27 21:36       ` [PATCH v2] " Zbigniew Jędrzejewski-Szmek
2011-09-27 21:48         ` Jeff King
2011-09-28 10:26       ` [PATCH v3] " Zbigniew Jędrzejewski-Szmek
2011-09-28 22:00         ` Junio C Hamano
2011-09-29 14:16           ` [PATCH v4] " Zbigniew Jędrzejewski-Szmek
2011-09-29 15:01             ` Joe Perches [this message]
2011-09-29 17:02               ` [PATCH] " Zbigniew Jędrzejewski-Szmek
2011-09-29 18:12                 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317308474.1854.8.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=zbyszek@in.waw.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).