index bbe1c17948e94aad56f5d7975f9d5f96641765a1..d5f68214266fc1497d9b34c2041c5534e833c108 100644 (file)
$msg = sprintf(_("XML error in gosa.conf: %s at line %d"),
xml_error_string(xml_get_error_code($this->parser)),
xml_get_current_line_number($this->parser));
- msg_dialog::display(_("Config file parsing"), $msg, FATAL_ERROR_DIALOG);
+ msg_dialog::display(_("Configuration error"), $msg, FATAL_ERROR_DIALOG);
exit;
}
}
$this->level--;
}
- function get_ldap_link($sizelimit= FALSE)
+
+ function get_credentials($creds)
{
+ if (isset($_SERVER['HTTP_GOSA_KEY'])){
+ return (cred_decrypt($creds, $_SERVER['HTTP_GOSA_KEY']));
+ }
+ return ($creds);
+ }
-# REuse last ldap valid handle again.
-# DISABLED due to unpredictable results.
-#
-# if($this->ldap === NULL || !is_resource($this->ldap->cid)){
-#
+ function get_ldap_link($sizelimit= FALSE)
+ {
+ if($this->ldap === NULL || !is_resource($this->ldap->cid)){
+
/* 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);
+ }
+
+ return new ldapMultiplexer($this->ldap);
}
function set_current($name)
$attrs= $ldap->fetch();
$this->data['SERVERS']['KERBEROS']= array( 'SERVER' => $attrs['cn'][0],
'REALM' => $attrs['goKrbRealm'][0],
- 'ADMIN' => $attrs['goKrbAdmin'][0],
- 'PASSWORD' => $attrs['goKrbPassword'][0]);
+ 'ADMIN' => $attrs['goKrbAdmin'][0]);
}
/* Get cups server. FIXME: only one is supported currently */
*/
function getShareList($listboxEntry = false)
{
- $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","",get_ou("serverou"),
+ $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("serverou"),
$this->current['BASE'],array("goExportEntry","cn"), GL_NONE);
$return =array();
foreach($tmp as $entry){