[Date Prev][Date Next]
Re: (ITS#3653) ldapsearch -b option doesn't work if there isn't a space
>--On Monday, April 11, 2005 9:44 PM -0700 "Kurt D. Zeilenga"
>>At 08:57 PM 4/11/2005, email@example.com wrote:
>>>Full_Name: Quanah Gibson-mount
>>>OS: Solaris 8
>>>Submission from: (NULL) (22.214.171.124)
>>>When running ldapsearch, this will work:
>>>ldapsearch -x -s base -hlocalhost -b '' +
>>>but this will not:
>>>ldapsearch -x -s base -hlocalhost -b'' +
>>The proper (and documented) usage is:
>> ldapsearch -x -s base -h localhost -b '' +
>Yet the other options (like -h, -s) work just fine with or without the
>space. Only -b messes up, and it seems to be rather buggy behavior to me.
>Why did it make the search base be + instead of ''? or throw an error, if
>you want to really enforce the space? As it is now, I would say that
>changing the base to + is not the correct behavior.
>Principal Software Developer
>GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
>"These censorship operations against schools and libraries are stronger
>than ever in the present religio-political climate. They often focus on
>fantasy and sf books, which foster that deadly enemy to bigotry and blind
>faith, the imagination." -- Ursula K. Le Guin
The behavior you see depends on the shell, that tricks getopt into
believing the argument to -b is the one after the "-b''"; in fact, for
the shell, -b'' and -b are exactly the same, i.e. a string made of two
chars: a dash ("-") and a "b". The documented usage" -b '' ", on the
contrary, makes the empty string '' a separate arg.
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497