From 5a08ca6dc1b137bc9b899c116ea4b936283aed88 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 4 Dec 2008 08:10:33 +0000 Subject: [PATCH] Updated kerberos URI dependencies git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13159 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../kerberos/class_password-methods-MIT.inc | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) 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 9c9218a68..f41b11425 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) || !$this->is_available()){ + if(!is_object($config)){ return; } @@ -284,14 +284,16 @@ class passwordMethodMIT extends passwordMethod $cache = session::get("MIT_PRINCIPAL_CACHE"); if(!isset($cache[$server])){ $o = new gosaSupportDaemon(); - $tmp = $o->krb5_list_principals($server); - if($o->is_error()){ - $this->si_error = TRUE; - $this->si_error_msg = sprintf(_("Cannot load principals from server '%s'!"),$server).": 
".$o->get_error(); - msg_dialog::display(_("Service infrastructure"),msgPool::siError($o->get_error()),ERROR_DIALOG); - return(array()); - }else{ - $cache[$server] = $tmp; + if($o->is_configured()){ + $tmp = $o->krb5_list_principals($server); + if($o->is_error()){ + $this->si_error = TRUE; + $this->si_error_msg = sprintf(_("Cannot load principals from server '%s'!"),$server).": 
".$o->get_error(); + msg_dialog::display(_("Service infrastructure"),msgPool::siError($o->get_error()),ERROR_DIALOG); + return(array()); + }else{ + $cache[$server] = $tmp; + } } session::set("MIT_PRINCIPAL_CACHE",$cache); } @@ -339,6 +341,7 @@ class passwordMethodMIT extends passwordMethod { $o = new gosaSupportDaemon(FALSE); + if(count($this->server_list) && $o->connect() && $o->is_configured()){ return TRUE; } -- 2.30.2