Code

Added kerberos host key generation
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 May 2008 13:46:21 +0000 (13:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 May 2008 13:46:21 +0000 (13:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11125 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
gosa-plugins/goto/admin/systems/goto/terminal.tpl
gosa-plugins/goto/admin/systems/goto/workstation.tpl

index 1434ff4767f536ed3ced557eaedb49f284852abb..00c2440f970bbda78001ccfb115393a4077d8d35 100644 (file)
@@ -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();
+    }
   }
 
 
index 681c33273eb6751dc4995773a0a9975159a5561c..adf8ca1f3ece8635527f8f6036aa3d187d59395c 100644 (file)
@@ -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();
+    }
   }
 
 
index 79927ad621380096ee283323a0ee29a06e734afc..18de97b38b20cc36efce3b5a597dd31fdf969ecd 100644 (file)
@@ -38,6 +38,8 @@
      </td>
     </tr>
    </table>
+       {$host_key}
+
 {if $member_of_ogroup}
    <br>
    <br>
index ca159a65a37632e45dbd19a62dcdd6cee4893e07..343f6b396315cee0f2e13b907ec8c8422a0bcdf4 100644 (file)
@@ -45,6 +45,9 @@
      </td>
     </tr>
    </table>
+
+       {$host_key}
+
 {if $member_of_ogroup}
    <br>
    <br>