Code

Added remove_from_parent to kerberos keys
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Jun 2008 09:27:44 +0000 (09:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Jun 2008 09:27:44 +0000 (09:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11240 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc

index 575681a02b48921184c2d8fe032e338350a065e1..e49e2e4ebb7fc6928aa4ee1a8f7b4a2fec128e36 100644 (file)
@@ -332,6 +332,24 @@ class krb_host_keys extends plugin
     }  
   } 
 
+  
+  /*! \brief  Removes all key settings for the given host ($this->object->cn)
+   */
+  public function remove_from_parent()
+  {
+    if(!$this->kerberos_support)  return;
+    foreach($this->server_list as $server => $data){
+      foreach($data['PRINCIPALS'] as $p_name){
+
+        /* Detect all principals for the current host.
+         */
+        if(preg_match("/".normalizePreg($this->prefix.$this->namingAttr)."\@/",$p_name)){
+          $this->delete_key($server, $p_name);
+        }
+      }
+    }
+  }
+
 
   /*! \brief  Ensures that a service plugin suitable HTML output is generated.
       @param  Boolean TRUE enables servie plugin output, FALSE diables it.