On Mon, May 10, 2004 at 04:33:59PM +0200, Toni Mueller wrote:
>
>
> Hello,
>
> after banging my head against the wall for problems having qmail-ldap
> authenticate against the LDAP directory (please see other post), I
> stumbled over the following snippet in boot/qmail-smtpd/run:
>
> eval `env - envdir ./env awk '\
> BEGIN { for (i in ENVIRON) printf "%s=\"%s\"\n", i, ENVIRON[i] }'`
>
>
> This does not work (under Linux at least) if the path where envdir is
> to be found is not in the system's path because "env - " resets the
> environment and thus removes any additions to the PATH one might have
> done a few lines before. After "set -xv" in run, the log shows:
>
> @40000000409f8f2d0e42f67c ++ env - envdir ./env awk ' BEGIN { for (i in
> ENVIRON) printf "%s=\"%s\"\n", i, ENVIRON[i] }'
> @40000000409f8f2d0e4ef8b4 env: envdir: No such file or directory
>
>
>
> I suggest using the following code snippet instead which does not
> require as many additional programs:
>
>
> for i in env/[A-Z]*; do
> F=`basename $i`
> eval "$F=\"`cat $i`\"; export $F"
> done
>
Hmm. env/[A-Z]* is not the same as "envdir ./env"
But you are right env - envdir is not working correctly in any cases.
Anyway this needs to be fixed and it will be fixed somehow.
--
:wq Claudio