Code

Some bugfixes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 May 2008 06:56:00 +0000 (06:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 May 2008 06:56:00 +0000 (06:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10777 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-MIT.inc

index fe3e7f0715111ae3d2f19640780dc2f8dee0d1fd..3cdad03185d9bb86ef634b33e8d4dfce1086b986 100644 (file)
@@ -112,6 +112,8 @@ class passwordMethodMIT extends passwordMethod
      */
     if($dn != "new" && $dn != ""){
       session::un_set("MIT_CACHE");
+      session::un_set("MIT_PRINCIPAL_CACHE");
+      session::un_set("MIT_POLICY_CACHE");
     }
 
     /* Get a list of all kerberos servers, defined in ldap
@@ -249,6 +251,7 @@ class passwordMethodMIT extends passwordMethod
         $this->si_error     = TRUE;
         $this->si_error_msg = $o->get_error(); 
         msg_dialog::display(_("Service infrastructure"),msgPool::siError($o->get_error()),ERROR_DIALOG);
+        return(array());
       }else{
         $cache[$server] = $tmp;
       }
@@ -275,6 +278,7 @@ class passwordMethodMIT extends passwordMethod
         $this->si_error     = TRUE;
         $this->si_error_msg = $o->get_error();
         msg_dialog::display(_("Service infrastructure"),msgPool::siError($o->get_error()),ERROR_DIALOG);
+        return(array());
       }else{
         $cache[$server] = array();
         $cache[$server]["_none_"] = _("none"); 
@@ -309,6 +313,7 @@ class passwordMethodMIT extends passwordMethod
     if (isset($this->config->current['KRBSASL']) && preg_match('/^true$/i', $this->config->current['KRBSASL'])){
       $mode= "sasl";
     }
+    echo "{".$mode."}".$this->attrs['uid'][0]."@".$this->goKrbRealm;
     return "{".$mode."}".$this->attrs['uid'][0]."@".$this->goKrbRealm;
   }
 
@@ -563,6 +568,10 @@ class passwordMethodMIT extends passwordMethod
 
       /* Save principal changes */
       $o = new gosaSupportDaemon();
+      if(in_array($principal,$this->server_list[$server_name]['principals'])){
+        $this->is_new = FALSE;
+      }
+
       if($this->is_new){
         $o->krb5_add_principal($server_mac,$principal,$entry);
       }else{