Code

Updated krb5 password method and host key classes.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 4 Dec 2008 08:00:59 +0000 (08:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 4 Dec 2008 08:00:59 +0000 (08:00 +0000)
-Do not initialize classes if gosaSupportUri is not configured.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13158 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 21f914eeca83ced05fa15d506201215abbcec9f6..350da6ec18cb2433a03792b7c279e1f6adaafe98 100644 (file)
@@ -111,6 +111,9 @@ class krbHostKeys extends plugin
       /* Create password handle, it has already a working principal parsing 
        */
       $this->pwd_handle = new passwordMethodMIT($this->config);
+      if(!$this->pwd_handle->is_available()){
+        return;
+      }
   
       /* Check class initialation */
       if(!($this->pwd_handle instanceOf passwordMethodMIT)){
index ccf7082448f0bc4e82e7e132be71238d485d9e37..9c9218a683698e622d46e8c445323c9a397f147b 100644 (file)
@@ -111,7 +111,7 @@ class passwordMethodMIT extends passwordMethod
     /* No config object given, this may be the case 
        if there is only a is_available() request triggered.
      */
-    if(!is_object($config)){
+    if(!is_object($config) || !$this->is_available()){
       return;
     }  
 
@@ -337,8 +337,9 @@ class passwordMethodMIT extends passwordMethod
    */ 
   public function is_available()
   {
+  
     $o = new gosaSupportDaemon(FALSE);
-    if(count($this->server_list) && $o->connect()){
+    if(count($this->server_list) && $o->connect() && $o->is_configured()){
       return TRUE; 
     }
     return(FALSE);