Mailing List Archive

[Debian issue #299733] exim4: $primary_hostname not expanded in cyrus_sasl authenicator
Hi,

this is issue #299733 from the Debian BTS. I am not sure whether this
is an issue with exim, but since the authenticators doesn't set any
server_hostname itself, I suspect the issue is with not expanding the
default.

Greetings
Marc

----- Forwarded message from Juergen Kreileder <jk@blackdown.de> -----

> From: Juergen Kreileder <jk@blackdown.de>
> Subject: exim4: $primary_hostname not expanded in cyrus_sasl authenicator
> Date: Wed, 16 Mar 2005 03:46:33 +0100
>
> Package: exim4
> Version: 4.50-4
> Severity: normal
>
> It looks like there is a bug in the cyrus_sasl authenticator when you
> don't set server_hostname (default value: $primary_hostname).
>
> I've tested the cyrus_sasl/cram-md5 with cmd5[1] and this configuration:
>
> ,----
> | cram_md5_sasl_server:
> | driver = cyrus_sasl
> | public_name = CRAM-MD5
> | server_realm = server
> | server_set_id = $1
> `----
>
> The challenge showed up as <...@$primary_hostname>, ie.
> $primary_hostname didn't get expanded.
>
>
> Juergen
>
> Footnotes:
> [1] http://www.net-track.ch/php/d.php?f=/opensource/cmd5/cmd5-0.1.tar.gz
>
> --
> Juergen Kreileder, Blackdown Java-Linux Team
> http://blog.blackdown.de/
>
>

----- End forwarded message -----

--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
Re: [Debian issue #299733] exim4: $primary_hostname not expanded in cyrus_sasl authenicator [ In reply to ]
On Wed, 16 Mar 2005, Marc Haber wrote:

> this is issue #299733 from the Debian BTS. I am not sure whether this
> is an issue with exim, but since the authenticators doesn't set any
> server_hostname itself, I suspect the issue is with not expanding the
> default.

Looks like a trivial typo; it does expand server_hostname, but then it
doesn't use the result! (And as this was not my original code, I refuse
to take the blame... :-)

The fix would seem to be to find these lines:

rc=sasl_server_new(CS ob->server_service, CS ob->server_hostname,
CS ob->server_realm, NULL, NULL, NULL, 0, &conn);

and replease "ob->server_hostname" by "hname".

Not tested, but I'll look at it in due course.


--
Philip Hazel University of Cambridge Computing Service,
ph10@cus.cam.ac.uk Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book: http://www.uit.co.uk/exim-book
Re: [Debian issue #299733] exim4: $primary_hostname not expanded in cyrus_sasl authenicator [ In reply to ]
On Wed, Mar 16, 2005 at 11:12:03AM +0000, Philip Hazel wrote:
> On Wed, 16 Mar 2005, Marc Haber wrote:
> > this is issue #299733 from the Debian BTS. I am not sure whether this
> > is an issue with exim, but since the authenticators doesn't set any
> > server_hostname itself, I suspect the issue is with not expanding the
> > default.
> Looks like a trivial typo; it does expand server_hostname, but then it
> doesn't use the result! (And as this was not my original code, I refuse
> to take the blame... :-)

Ooops. :-) I thought I'd fixed that. Oh well...

> The fix would seem to be to find these lines:
> rc=sasl_server_new(CS ob->server_service, CS ob->server_hostname,
> CS ob->server_realm, NULL, NULL, NULL, 0, &conn);
> and replease "ob->server_hostname" by "hname".

I think this is what I did.

Cheers

MBM

--
Matthew Byng-Maddick <mbm@colondot.net> http://colondot.net/
(Please use this address to reply)
Re: [Debian issue #299733] exim4: $primary_hostname not expanded in cyrus_sasl authenicator [ In reply to ]
On Wed, 16 Mar 2005, Matthew Byng-Maddick wrote:
>
> Ooops. :-) I thought I'd fixed that. Oh well...

I thought you'd fixed that too.

Tony.
--
<fanf@exim.org> <dot@dotat.at> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}