Code

Updated ldap export
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Nov 2010 07:55:36 +0000 (07:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Nov 2010 07:55:36 +0000 (07:55 +0000)
-do not pipe the passwort into the command, just set it as parameter.

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@20345 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_ldap.inc

index 82263242cf1c083f78dadba92af413a19762b001..2227e664e613cdd5b3985de69691093f8a666fa1 100644 (file)
@@ -899,7 +899,7 @@ class LDAP{
       $filter = escapeshellarg($filter);
 
         
-      $cmd = "ldapsearch -x -LLLL -D {$admin} {$filter} {$limit} {$scope} -H {$host} -b {$dn} -W ";
+      $cmd = "ldapsearch -x -LLLL -D {$admin} {$filter} {$limit} {$scope} -H {$host} -b {$dn} -w {$pwd} ";
 
       // Create list of process pipes
       $descriptorspec = array(
@@ -912,7 +912,6 @@ class LDAP{
       if (is_resource($process)) {
 
           // Write the password to stdin
-          fwrite($pipes[0], $pwd);
           fclose($pipes[0]);
 
           // Get results from stdout and stderr