Code

Updated support daemon class- Added function used to remove a key from a dak key...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 Jun 2008 12:39:11 +0000 (12:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 Jun 2008 12:39:11 +0000 (12:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11358 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_gosaSupportDaemon.inc

index 478eee9c7a9770f4f13fadc4209f8c8d122037b2..13f6470060cc3ccf026bb7470f06ab01568f12f5 100644 (file)
@@ -1912,6 +1912,34 @@ class gosaSupportDaemon
     $res = $this->_send($xml_msg,TRUE);
     return($this->is_error());
   }
+
+
+  /*! \brief Removes a key from the keyring on the given server. 
+      @param  String  The servers mac address 
+      @param  String  The gpg key uid.
+      @return Boolean TRUE on success else FALSE 
+   */
+  public function DAK_remove_key($server,$key)  
+  {
+    /* Ensure that we send the event to a valid mac address 
+     */
+    if(!is_string($server) || !tests::is_mac($server)){
+      trigger_error("No valid mac address given '".$server."'.");
+      return;
+    }
+
+    /* Create query
+     */
+    $xml_msg = "<xml> 
+                  <header>gosa_remove_dak_key</header> 
+                  <target>".$server."</target> 
+                  <uid>".$key."</uid> 
+                  <source>GOSA</source>
+                </xml>";
+       
+    $res = $this->_send($xml_msg,TRUE);
+    return($this->is_error());
+  }
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: