From 30b02a4debcfbc55ccf5376d624a99a0f7da07cc Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 5 May 2008 06:26:20 +0000 Subject: [PATCH] Uppated Mit password method. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10754 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../services/kerberos/class_password-methods-MIT.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 d46e4e3b1..8c808b73e 100644 --- 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 @@ -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]); -- 2.30.2