Hi,

I'm facing a problem with global address searching in an LDAP directory.

When I trigger I search from within sqwebmail, the cgi passes
        -h ldap.host.com -p 389 -b ou=person,dc=example.com (&(sn=Smith))
as a parameter to the ldapsearch wrapper shell script (in
/usr/local/share/sqwebmail/).

With the definition in the ldapsearch wrapper this makes
        ldapsearch -x -l 60 -z 20 -h ldap.host.com -p 389 -b
ou=person,dc=example.com (&(sn=Smith))
which looks basically ok.

The problem now is that if I type this in the shell, I'm getting a shell
error:
        bash: syntax error near unexpected token `&'
(I tried with other shells as well - no luck.

If I put the part (&(sn=Smith)) into quotes, e.g. "(&(sn=Smith))" then
everything is ok.

Is there a way to resolve this problem without patching the source?

Thanks in advance for any hints,
David.

Reply via email to