diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index 13f6470060cc3ccf026bb7470f06ab01568f12f5..571a3f89f72b54401df4cfc24f742f21c8d9db57 100644 (file)
global $config;
# load from config, store statically
global $config;
# load from config, store statically
- if (isset($config->current['GOSA_SI'])){
+ if ($config->get_cfg_value("gosa_si") != ""){
if ($this->s_host == ""){
if ($this->s_host == ""){
- $this->s_host= preg_replace("/^.*@([^:]+):.*$/", "$1", $config->current['GOSA_SI']);
- $this->i_port= preg_replace("/^.*@[^:]+:(.*)$/", "$1", $config->current['GOSA_SI']);
- $this->s_encryption_key = preg_replace("/^(.*)@[^:]+:.*$/", "$1", $config->current['GOSA_SI']);
+ $this->s_host= preg_replace("/^.*@([^:]+):.*$/", "$1", $config->get_cfg_value("gosa_si"));
+ $this->i_port= preg_replace("/^.*@[^:]+:(.*)$/", "$1", $config->get_cfg_value("gosa_si"));
+ $this->s_encryption_key = preg_replace("/^(.*)@[^:]+:.*$/", "$1", $config->get_cfg_value("gosa_si"));
}
$this->f_timeout = $timeout;
}
$this->f_timeout = $timeout;
return($this->is_connected);
}
return($this->is_connected);
}
+
+ /*! \brief Returns TRUE whether we are connected or not
+ @return BOOLEAN Returns TRUE when connected else FALSE
+ */
+ public function is_connected()
+ {
+ return($this->is_connected);
+ }
+
+
/*! \brief Disconnect from gosa daemon.
*/
/*! \brief Disconnect from gosa daemon.
*/
}
if ($xml_elem['type'] == 'complete') {
}
if ($xml_elem['type'] == 'complete') {
+ $start_level = 1;
+ $test2 = &$params;
+ while($start_level < $xml_elem['level']) {
+ $test2 = &$test2[$level[$start_level]];
+ $start_level++;
+ }
+
/* Save tag attributes too.
e.g. <tag attr="val">
*/
/* Save tag attributes too.
e.g. <tag attr="val">
*/
}
}
}
}
- $start_level = 1;
- $test2 = &$params;
- while($start_level < $xml_elem['level']) {
- $test2 = &$test2[$level[$start_level]];
- $start_level++;
- }
if(!isset($test2[$xml_elem['tag']])){
if(isset($xml_elem['value'])){
$test2[$xml_elem['tag']] = $xml_elem['value'];
if(!isset($test2[$xml_elem['tag']])){
if(isset($xml_elem['value'])){
$test2[$xml_elem['tag']] = $xml_elem['value'];
@param ...
@return Array All queued entries.
*/
@param ...
@return Array All queued entries.
*/
- public function DAK_get_queue_entries($server)
+ public function DAK_keyring_entries($server)
{
/* Ensure that we send the event to a valid mac address
*/
{
/* Ensure that we send the event to a valid mac address
*/
$key = preg_replace("/^.*\n\n/sim","",$key);
/* Remove footer */
$key = preg_replace("/-----.*$/sim","",$key);
$key = preg_replace("/^.*\n\n/sim","",$key);
/* Remove footer */
$key = preg_replace("/-----.*$/sim","",$key);
+ }elseif (!preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $key)) {
+
+ /* Encode key if it is raw.
+ */
+ $key = base64_encode($key);
}
/* Create query
}
/* Create query
$xml_msg = "<xml>
<header>gosa_remove_dak_key</header>
<target>".$server."</target>
$xml_msg = "<xml>
<header>gosa_remove_dak_key</header>
<target>".$server."</target>
- <uid>".$key."</uid>
+ <keyid>".$key."</keyid>
<source>GOSA</source>
</xml>";
<source>GOSA</source>
</xml>";