From cd632fe8e4f58509a3dfdc9cfe483e84baa6c65e Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 4 Dec 2008 08:00:59 +0000 Subject: [PATCH] Updated krb5 password method and host key classes. -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 --- .../admin/systems/services/kerberos/class_krb_host_keys.inc | 3 +++ .../systems/services/kerberos/class_password-methods-MIT.inc | 5 +++-- 2 files changed, 6 insertions(+), 2 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 21f914eec..350da6ec1 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 @@ -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)){ diff --git a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_password-methods-MIT.inc b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_password-methods-MIT.inc index ccf708244..9c9218a68 100644 --- a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_password-methods-MIT.inc +++ b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_password-methods-MIT.inc @@ -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); -- 2.30.2