From c24d8cc8ffb92446c06f223dcdec300907e8133b Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 5 Jun 2008 09:27:44 +0000 Subject: [PATCH] Added remove_from_parent to kerberos keys git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11240 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../services/kerberos/class_krb_host_keys.inc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc index 575681a02..e49e2e4eb 100644 --- a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc +++ b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc @@ -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. -- 2.30.2