index c34036c32bbfe61ff5a123c3985a403bd468ec91..f6e908a375ea958e1d0618d1095f9762db08d8f9 100644 (file)
$pwd = escapeshellarg($this->bindpw);
$filter = escapeshellarg($filter);
$host = escapeshellarg($this->hostname);
- $cmd = "ldapsearch -x -LLLL -D {$admin} -w {$pwd} {$filter} {$limit} {$scope} -H {$host} -b {$dn} $attrs";
- exec($cmd, $ret,$code);
- $res = implode($ret,"\n");
+ $cmd = "ldapsearch -x -LLLL -D {$admin} -w {$pwd} {$filter} {$limit} {$scope} -H {$host} -b {$dn} $attrs ";
+ ob_start();
+ passthru($cmd);
+ $res=ob_get_contents();
+ ob_end_clean();
return($res);
}