summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dbfa757)
raw | patch | inline | side by side (parent: dbfa757)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Oct 2010 09:03:44 +0000 (09:03 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Oct 2010 09:03:44 +0000 (09:03 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20097 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ldap.inc | patch | blob | history |
index d531476cb3bb2a8dfe475c6c1084fe1fac92cef7..9c8a3996fce80844af20732c04084b7d63b20499 100644 (file)
}
$scope = (!empty($scope))?' -s '.$scope: '';
+ // First check if we are able to call 'ldapsearch' on the command line.
+ $check = shell_exec('which ldapsearch');
+ if(empty($check)){
+ $this->error = sprintf(_("Missing command line programm '%s'!"), 'ldapsearch');
+ return(NULL);
+ }
+
// Prepare parameters to be valid for shell execution
$dn = escapeshellarg($dn);
$pwd = $this->bindpw;
// Close the process and check its return value
if(proc_close($process) != 0){
- trigger_error($err);
+ $this->error = $err;
+ return(NULL);
}
}
return($res);