X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_gosaSupportDaemon.inc;h=1f0ace96d53023ff967279645cc5fa577357232e;hb=29dcf1374812069ab2f1b27a47e23c6d07004cf5;hp=13f6470060cc3ccf026bb7470f06ab01568f12f5;hpb=d9d38c993b7717f1853db71b4034ef25786904ce;p=gosa.git diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index 13f647006..1f0ace96d 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -84,6 +84,16 @@ class gosaSupportDaemon 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. */ @@ -827,6 +837,13 @@ class gosaSupportDaemon } 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. */ @@ -836,12 +853,6 @@ class gosaSupportDaemon } } - $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']; @@ -1839,7 +1850,7 @@ class gosaSupportDaemon @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 */ @@ -1898,6 +1909,11 @@ class gosaSupportDaemon $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 @@ -1933,7 +1949,7 @@ class gosaSupportDaemon $xml_msg = "
gosa_remove_dak_key
".$server." - ".$key." + ".$key." GOSA
";