summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 885cc4b)
raw | patch | inline | side by side (parent: 885cc4b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Apr 2008 11:50:27 +0000 (11:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Apr 2008 11:50:27 +0000 (11:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10742 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-MIT.inc | patch | blob | history |
diff --git a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-MIT.inc b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-MIT.inc
index 4ce94463406b675ba9b9b551fa2fbfe6e673e1c3..dda6b4b4544e8a0f3b849ee25dff9a8ee1cdc6c2 100644 (file)
var $principal = ""; // The principals name (e.g. user@MY-DOMAIN.SYS)
var $is_new = TRUE; // Is TRUE if principal is new
+ var $si_error = FALSE;
+ var $si_error_msg = "";
+
var $values = array(
"PRINC_EXPIRE_TIME", // Expiry date of this principal
"PW_EXPIRATION", // Password expiration
$tmp = array();
$tmp = $o->krb5_get_principal($server,$name);
if($o->is_error()){
+
+ $this->si_error = TRUE;
+ $this->si_error_msg = $o->get_error();
msg_dialog::display(_("Service infrastructure"),msgPool::siError($o->get_error()),ERROR_DIALOG);
}else{
if(!isset($cache[$server])){
$o = new gosaSupportDaemon();
$tmp = $o->krb5_list_principals($server);
- $cache[$server] = $tmp;
+ if($o->is_error()){
+ $this->si_error = TRUE;
+ $this->si_error_msg = $o->get_error();
+ msg_dialog::display(_("Service infrastructure"),msgPool::siError($o->get_error()),ERROR_DIALOG);
+ }else{
+ $cache[$server] = $tmp;
+ }
session::set("MIT_PRINCIPAL_CACHE",$cache);
}
return($cache[$server]);
session::set("MIT_POLICY_CACHE",array());
}
$cache = session::get("MIT_POLICY_CACHE");
- if(1 | !isset($cache[$server])){
+ if(!isset($cache[$server])){
$o = new gosaSupportDaemon();
$tmp = $o->krb5_list_policies($server);
- $cache[$server] = array();
- $cache[$server]["_none_"] = _("none");
- foreach($tmp as $policy){
- $cache[$server][$policy] = $policy;
+ if($o->is_error()){
+ $this->si_error = TRUE;
+ $this->si_error_msg = $o->get_error();
+ msg_dialog::display(_("Service infrastructure"),msgPool::siError($o->get_error()),ERROR_DIALOG);
+ }else{
+ $cache[$server] = array();
+ $cache[$server]["_none_"] = _("none");
+ foreach($tmp as $policy){
+ $cache[$server][$policy] = $policy;
+ }
+ ksort($cache[$server]);
}
- ksort($cache[$server]);
session::set("MIT_POLICY_CACHE",$cache);
}
return($cache[$server]);
*/
function is_available()
{
+ return(TRUE);
$o = new gosaSupportDaemon(FALSE);
if(count($this->server_list) && $o->connect()){
return TRUE;
$server = $this->map['REALM_SERVER'][$this->goKrbRealm];
$o = new gosaSupportDaemon();
if(!$o->krb5_del_principal($this->server_list[$server]['macAddress'],$this->principal)){
+ $this->si_error = TRUE;
+ $this->si_error_msg = $o->get_error();
msg_dialog::display(_("Service infrastructure"),msgPool::siError($o->get_error()),ERROR_DIALOG);
}
}
$smarty = get_smarty();
+
+ $smarty->assign("si_error",$this->si_error);
+ $smarty->assign("si_error_msg",$this->si_error_msg);
+
$smarty->assign("years",$years);
$smarty->assign("month",$month);
$smarty->assign("days",$days);
function save_object()
{
+ /* If the communication with the si server failed,
+ you are able to retry to connect to the server.
+ Here we hanlde those requests.
+ */
+ if(isset($_POST['retry_si'])){
+ $this->__construct($this->config,$this->parent_dn);
+ }
+
+ /* Only handle posts for this plugin, it its content was posted
+ */
if(isset($_POST['pwd_heimdal_posted'])){
if(isset($_POST['goKrbRealm'])){
$o->krb5_set_principal($server_mac,$principal,$entry);
}
if($o->is_error()){
+ $this->si_error = TRUE;
+ $this->si_error_msg = $o->get_error();
msg_dialog::display(_("Service infrastructure"),msgPool::siError($o->get_error()),ERROR_DIALOG);
}
}