Code

Uppated Mit password method.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 May 2008 06:26:20 +0000 (06:26 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 May 2008 06:26:20 +0000 (06:26 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10754 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index d46e4e3b1fdb2569d83b21f5df33dc8436267b13..8c808b73ef2b1f8cd58c22a7803992d28be177eb 100644 (file)
@@ -136,6 +136,12 @@ class passwordMethodMIT extends passwordMethod
       $this->map["SERVER_REALM"][$attrs['cn'][0]] = $attrs['goKrbRealm'][0];
       $this->map["REALM_SERVER"][$attrs['goKrbRealm'][0]] = $attrs['cn'][0];
 
+      /* Set first realm as selected.  
+       */
+      if($this->goKrbRealm == ""){
+        $this->goKrbRealm = $attrs['goKrbRealm'][0];
+      }
+
       /* Create Server list
        */
       $this->server_list[$attrs['cn'][0]] = array("macAddress" => $attrs['macAddress'][0],
@@ -154,7 +160,7 @@ class passwordMethodMIT extends passwordMethod
       $ldap->cd($dn);
       $ldap->cat($dn);
       $this->attrs = $ldap->fetch();
-      if(isset($this->attrs['userPassword'])){
+      if(isset($this->attrs['userPassword']) && preg_match("/".$this->get_hash_name()."/",$this->attrs['userPassword'][0])){
 
         $p_name = preg_replace("/^\{".$this->get_hash_name()."\}/","",$this->attrs['userPassword'][0]);