From 06171cbc014da10ff9b74a17bffd77642ff03fa3 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 30 May 2008 13:46:21 +0000 Subject: [PATCH] Added kerberos host key generation git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11125 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/class_terminalGeneric.inc | 18 ++++++++++++++++++ .../systems/goto/class_workstationGeneric.inc | 17 +++++++++++++++++ .../goto/admin/systems/goto/terminal.tpl | 2 ++ .../goto/admin/systems/goto/workstation.tpl | 3 +++ 4 files changed, 40 insertions(+) diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc index 1434ff476..00c2440f9 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc @@ -53,6 +53,9 @@ class termgeneric extends plugin var $member_of_ogroup = FALSE; + var $kerberos_key_service = NULL; + + function termgeneric (&$config, $dn= NULL, $parent= NULL) { /* Check if FAI is activated */ @@ -63,6 +66,10 @@ class termgeneric extends plugin plugin::plugin ($config, $dn, $parent); + if(class_available("krb_host_keys")){ + $this->kerberos_key_service = new krb_host_keys($this->config,$this); + } + if(!isset($this->parent->by_object['ogroup'])){ $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->config->current['BASE']); @@ -304,6 +311,13 @@ class termgeneric extends plugin return($str); } $smarty->assign("netconfig", $str); + + /* Display kerberos host key options */ + $smarty->assign("host_key",""); + if(is_object($this->kerberos_key_service)){ + $smarty->assign("host_key",$this->kerberos_key_service->execute()); + } + return($smarty->fetch (get_template_path('terminal.tpl', TRUE, dirname(__FILE__)))); } @@ -386,6 +400,10 @@ class termgeneric extends plugin $this->set_everything_to_inherited(); } + /* Hanle kerberos host key plugin */ + if(is_object($this->kerberos_key_service)){ + $this->kerberos_key_service->save_object(); + } } diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc index 681c33273..adf8ca1f3 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc @@ -59,6 +59,8 @@ class workgeneric extends plugin var $currently_installing = FALSE; var $currently_installing_warned = FALSE; + var $kerberos_key_service = NULL; + function workgeneric (&$config, $dn= NULL, $parent= NULL) { $tmp= $config->search("faiManagement", "CLASS",array('menu','tabs')); @@ -68,6 +70,10 @@ class workgeneric extends plugin plugin::plugin ($config, $dn, $parent); + if(class_available("krb_host_keys")){ + $this->kerberos_key_service = new krb_host_keys($this->config,$this); + } + if(!isset($this->parent->by_object['ogroup'])){ $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->config->current['BASE']); @@ -333,6 +339,12 @@ class workgeneric extends plugin } $smarty->assign("netconfig", $str); + /* Display kerberos host key options */ + $smarty->assign("host_key",""); + if(is_object($this->kerberos_key_service)){ + $smarty->assign("host_key",$this->kerberos_key_service->execute()); + } + /* Show main page */ $smarty->assign("currently_installing", $this->currently_installing); return($smarty->fetch (get_template_path('workstation.tpl', TRUE, dirname(__FILE__)))); @@ -412,6 +424,11 @@ class workgeneric extends plugin if(isset($_POST["inheritAll"])){ $this->set_everything_to_inherited(); } + + /* Hanle kerberos host key plugin */ + if(is_object($this->kerberos_key_service)){ + $this->kerberos_key_service->save_object(); + } } diff --git a/gosa-plugins/goto/admin/systems/goto/terminal.tpl b/gosa-plugins/goto/admin/systems/goto/terminal.tpl index 79927ad62..18de97b38 100644 --- a/gosa-plugins/goto/admin/systems/goto/terminal.tpl +++ b/gosa-plugins/goto/admin/systems/goto/terminal.tpl @@ -38,6 +38,8 @@ + {$host_key} + {if $member_of_ogroup}

diff --git a/gosa-plugins/goto/admin/systems/goto/workstation.tpl b/gosa-plugins/goto/admin/systems/goto/workstation.tpl index ca159a65a..343f6b396 100644 --- a/gosa-plugins/goto/admin/systems/goto/workstation.tpl +++ b/gosa-plugins/goto/admin/systems/goto/workstation.tpl @@ -45,6 +45,9 @@ + + {$host_key} + {if $member_of_ogroup}

-- 2.30.2