Could it be a bug in the underlying system?
On Solaris 7, exim 3.22 (with pam, ssl and wrap) gives...
/usr/exim/bin/exim -be -C ~/conf2
> ${if crypteq{abcde}{}{yes}{no}}
no
The same version of exim built on Solaris 5.5.1
(without pam, ssl or wrap because) gives...
./exim -be -C ~/conf2
> ${if crypteq{abcde}{}{yes}{no}}
yes
>
Frank, I know, is using Solaris 2.6.
Robert Evans
>
> On Thu, 25 Jan 2001, Frank Elsner wrote:
>
> > plain:
> > driver = plaintext
> > public_name = PLAIN
> > server_condition = \
> > "${if or {\
> > {crypteq {$3} {${lookup{$2}dbm{DBM/auth/mailszrz}{$value}}}}\
> > {crypteq {$3} {${lookup{$2}dbm{DBM/auth/linux}{$value}}}}\
> > {crypteq {$3} {${lookup{$2}dbm{DBM/auth/sp}{$value}}}}\
> > }{yes}{no} }"
> > server_set_id = $2
> >
> > When fed with incorrect authentication data it incorrectly succeeds,
strange.
>
> Oh dear. You seem to have uncovered a nasty bug. The failing of the
> lookup results in a blank string, and I have just tested
>
> ${if crypteq{abcde}{}{yes}{no}}
>
> and it gives the answer "yes". This must be some artefact of the way the
> code handles "crypteq". I will investigate it after lunch and post a
> patch.
>
> Meanwhile, however, you can easily get round the problem by supplying a
> junk, non-empty string when the lookups fail. After each {$value} insert
> {junk}.
>
> --
> Philip Hazel University of Cambridge Computing Service,
> ph10@??? Cambridge, England. Phone: +44 1223 334714.
>
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at
http://www.exim.org/ ##
--
mailto:Robert.Evans@cs.cf.ac.uk Tel:+44(0)29 2087 5518
http://www.cs.cf.ac.uk/People/Robert.Evans.html Fax:+44(0)29 2087 4598
Dept of Computer Science, Cardiff University, PO Box 916, Cardiff, CF24 3XF
Cardiff University is the public name of the University of Wales, Cardiff,
a constituent institution of the University of Wales.