On Saturday 17 May 2003 01.37, jamie wrote:
> > Yes. You need quotes around each argument with sensitive
> > characters
> >
> > Sensitive characters are
> >
> > ( ) & and spaces
>
> This is starting to make sense.
> My problem is this little guy (uid=%s) in my
>
> open2(*read1,*write1,"/usr/lib/squid/squid_ldap_auth -u cn -b
> ou=people,dc=newberg,dc=k12,dc=or,dc=us -f (uid=%s) -h
> ldap.newberg.k12.or.us");
>
> When I pull it out of the open2 script I get no errors. It still
> doesn't work as I think it needs that for the search filter.
>
> So I tried to put the quotes around the sensitive characters. But I
> don't really under stand what that means HAHA!
>
> Man I tried it every which way I could think of and still got
> errors.
>
> "(uid=%s)"
> ("uid=%s")
> ("uid"=%s)
> (uid="%s")
> "("uid=%s")"
>
> I am at a loss on this one.
As you are already inside a quoted string in your perl script you
either have to use single quotes, or escape the quotes with a \
"/usr/lib/squid/squid_ldap_auth ... -f '(uid=%s)' ..."
or
"/usr/lib/squid/squid_ldap_auth ... -f \"(uid=%s)\" ..."
or you can invert the qoting:
'/usr/lib/squid/squid_ldap_auth ... -f "(uid=%s)" ...'
Note that in the last example you cannot use any perl variables inside
the command line (your script don't..).
Regards
Henrik
-- Donations welcome if you consider my Free Squid support helpful. https://www.paypal.com/xclick/business=hno%40squid-cache.org If you need commercial Squid support or cost effective Squid or firewall appliances please refer to MARA Systems AB, Sweden http://www.marasystems.com/, info@marasystems.comReceived on Sat May 17 2003 - 01:31:00 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:16:43 MST