Subject: | -s switch handled badly in the bin/ldapsearch |
It seems that the -s switch is handled badly in the bin/ldapsearch.pl included with
I changed these 3 lines in my local copy and it works much better:
from this:
$searchargs{scope} = $opt_s if $opt_s;
$searchargs{scope} = $url->_scope if defined $url->_scope;
$searchargs{scope} = $scopes{$searchargs{scope}} if $searchargs{scope};
to this:
$searchargs{scope} = $url->_scope if defined $url->_scope;
$searchargs{scope} = $scopes{$searchargs{scope}} if $searchargs{scope};
$searchargs{scope} = $opt_s if $opt_s;
Honestly, I only really cared about "$searchargs{scope} = $opt_s if $opt_s;" and don't know what the other 2 do, but it seemed that they interfered with the -s I had specified on the command-line.