Changeset View
Changeset View
Standalone View
Standalone View
lib/Net/LDAP3.php
Show First 20 Lines • Show All 767 Lines • ▼ Show 20 Lines | class Net_LDAP3 | ||||
protected function effective_rights_mozldap($entry_dn) | protected function effective_rights_mozldap($entry_dn) | ||||
{ | { | ||||
$moz_ldapsearch = "/usr/lib64/mozldap/ldapsearch"; | $moz_ldapsearch = "/usr/lib64/mozldap/ldapsearch"; | ||||
if (!is_file($moz_ldapsearch)) { | if (!is_file($moz_ldapsearch)) { | ||||
$moz_ldapsearch = "/usr/lib/mozldap/ldapsearch"; | $moz_ldapsearch = "/usr/lib/mozldap/ldapsearch"; | ||||
} | } | ||||
if (!is_file($moz_ldapsearch)) { | if (!is_file($moz_ldapsearch)) { | ||||
$moz_ldapsearch = "/usr/bin/ldapsearch"; | |||||
} | |||||
if (!is_file($moz_ldapsearch)) { | |||||
$moz_ldapsearch = null; | $moz_ldapsearch = null; | ||||
} | } | ||||
if (empty($moz_ldapsearch)) { | if (empty($moz_ldapsearch)) { | ||||
$this->_error("Mozilla LDAP C SDK binary ldapsearch not found, cannot get effective rights"); | $this->_error("Mozilla LDAP C SDK binary ldapsearch not found, cannot get effective rights"); | ||||
return null; | return null; | ||||
} | } | ||||
Show All 16 Lines | protected function effective_rights_mozldap($entry_dn) | ||||
); | ); | ||||
if ($this->vendor_name() == "Oracle Corporation") { | if ($this->vendor_name() == "Oracle Corporation") { | ||||
// For Oracle DSEE | // For Oracle DSEE | ||||
$command[] = "-J"; | $command[] = "-J"; | ||||
$command[] = escapeshellarg(self::CONTROL_EFFECTIVE_RIGHTS . ':true'); | $command[] = escapeshellarg(self::CONTROL_EFFECTIVE_RIGHTS . ':true'); | ||||
$command[] = "-c"; | $command[] = "-c"; | ||||
$command[] = escapeshellarg('dn:' . $this->_current_bind_dn); | $command[] = escapeshellarg('dn:' . $this->_current_bind_dn); | ||||
} else if ($moz_ldapsearch == "/usr/bin/ldapsearch") { | |||||
// Modern 389 DS: | |||||
$command[] = "-E"; | |||||
$command[] = escapeshellarg("!" . self::CONTROL_EFFECTIVE_RIGHTS . '=:dn:' . $this->_current_bind_dn); | |||||
} else { | } else { | ||||
// For 389 DS: | // For 389 DS: | ||||
$command[] = "-J"; | $command[] = "-J"; | ||||
$command[] = escapeshellarg(self::CONTROL_EFFECTIVE_RIGHTS . ':true:dn:' . $this->_current_bind_dn); | $command[] = escapeshellarg(self::CONTROL_EFFECTIVE_RIGHTS . ':true:dn:' . $this->_current_bind_dn); | ||||
} | } | ||||
// For both | // For both | ||||
$command[] = '"(objectclass=*)"'; | $command[] = '"(objectclass=*)"'; | ||||
▲ Show 20 Lines • Show All 2,394 Lines • Show Last 20 Lines |