index 7b55d77337bbeaf03a17f25be40dd6ffb37f0435..270f1e2565c7f5484e10308ce47d45a1a1805a40 100644 (file)
--- a/include/class_config.inc
+++ b/include/class_config.inc
$this->level--;
}
- function get_ldap_link($sizelimit= FALSE)
+
+ function get_credentials($creds)
{
- if($this->ldap === NULL || !is_resource($this->ldap->cid)){
+ if (isset($_SERVER['HTTP_GOSA_KEY'])){
+ return (cred_decrypt($creds, $_SERVER['HTTP_GOSA_KEY']));
+ }
+ return ($creds);
+ }
+
+ function get_ldap_link($sizelimit= FALSE)
+ {
/* Build new connection */
$this->ldap= ldap_init ($this->current['SERVER'], $this->current['BASE'],
- $this->current['ADMIN'], $this->current['PASSWORD']);
+ $this->current['ADMIN'], $this->get_credentials($this->current['PASSWORD']));
/* Check for connection */
if (is_null($this->ldap) || (is_int($this->ldap) && $this->ldap == 0)){
} else {
$this->ldap->referrals= $this->current['REFERRAL'];
}
- }
+# }
return ($this->ldap);
}