From a680c6d8b65814d34c73ba48f6611d4f8da531a1 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 5 Jun 2008 08:46:25 +0000 Subject: [PATCH] Fixed krb key plugin style git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11232 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../services/kerberos/class_krb_host_keys.inc | 20 +++++++++++++++++++ .../services/kerberos/krb_host_keys.tpl | 19 ++++++++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) 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 62c96eeba..575681a02 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 @@ -78,6 +78,19 @@ class krb_host_keys extends plugin } } + + /*! \brief Reloads the list of available principals. + */ + public function reload_principals() + { + if($this->kerberos_support){ + foreach($this->server_list as $mac => $data){ + $principals = $this->pwd_handle->load_principals_for_server($mac); + $this->server_list[$mac]['PRINCIPALS'] = $principals; + } + } + } + /*! \brief Load/reload all key settings for the current host ($this->object). This reloads the list of all kerberos realms and which keys @@ -195,6 +208,7 @@ class krb_host_keys extends plugin /* The host name has changed, check if there are kerberos key which have to be updated */ $found = array(); + $this->reload_principals(); foreach($this->server_list as $server => $data){ foreach($data['PRINCIPALS'] as $p_name){ @@ -309,6 +323,12 @@ class krb_host_keys extends plugin $this->init(); break; } + + /* Reload krb key list */ + if(preg_match("/^reload_krb_keys/",$name)){ + $this->init(); + break; + } } } diff --git a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/krb_host_keys.tpl b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/krb_host_keys.tpl index a9707c2e4..2bc8890bc 100644 --- a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/krb_host_keys.tpl +++ b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/krb_host_keys.tpl @@ -1,20 +1,31 @@ {if !$is_service_key}

 

{/if} -

{t}Host key{/t}

+

{t}Kerberos keys{/t}

+ +{t}Reload key list{/t}   + + +
+
+{t}Realms{/t}:   +
{foreach from=$server_list item=item key=key} - + - + {/foreach} -- 2.30.2
{$item.REALM}{$item.REALM} {if $item.PRESENT} + alt='{t}Recreate key{/t}' title='{t}Recreate key{/t}' + src='images/crossref.png'> {else} @@ -22,7 +33,7 @@
{t}Keys for this realm{/t}:{t}Kerberos keys for this realm{/t}: {$item.USED}