From 4e1135ea18592c47d32ef2f07b8435c60e76e784 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 15 Nov 2006 13:45:57 +0000 Subject: [PATCH] Updated kerberos password handling git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5126 594d385d-05f5-0310-b6e9-bd551577e9d8 --- Changelog | 1 + include/class_password-methods-kerberos.inc | 4 ++-- include/class_password-methods.inc | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 5c04a2748..92b290260 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,7 @@ GOsa2 changelog - Avoid removal of shares while they are used by users - Added finer grained ACL settings for mail accounts - Fixed day of birth problem in M$ IE + - Fixed setting of Kerberos passwords * gosa 2.5.5 - Added remove method for shared folder in kolab mode diff --git a/include/class_password-methods-kerberos.inc b/include/class_password-methods-kerberos.inc index 1e8ba722d..d1c775782 100644 --- a/include/class_password-methods-kerberos.inc +++ b/include/class_password-methods-kerberos.inc @@ -52,7 +52,7 @@ class passwordMethodkerberos extends passwordMethod print_red (_("Kerberos database communication failed!")); } - $ret= kadm5_chpass_principal($handle, $attrs['uid'][0]."@".$cfg['REALM'],$password); + $ret= kadm5_chpass_principal($handle, $this->attrs['uid'][0]."@".$cfg['REALM'],$password); if ($ret === FALSE) { @@ -61,7 +61,7 @@ class passwordMethodkerberos extends passwordMethod kadm5_destroy($handle); - $newpass= "{kerberos}".$attrs['uid'][0]."@".$cfg['REALM']; + $newpass= "{kerberos}".$this->attrs['uid'][0]."@".$cfg['REALM']; return $newpass; } diff --git a/include/class_password-methods.inc b/include/class_password-methods.inc index 97571da79..2755134f1 100644 --- a/include/class_password-methods.inc +++ b/include/class_password-methods.inc @@ -22,6 +22,7 @@ class passwordMethod { var $config = false; + var $attrs= array(); // Konstructor function passwordMethod($config) @@ -102,7 +103,7 @@ function change_password ($dn, $password, $mode=0, $hash= "") // read current password entry for $dn, to detect the encryption Method $ldap = $config->get_ldap_link(); - $ldap->cat ($dn, array("shadowLastChange", "userPassword")); + $ldap->cat ($dn, array("shadowLastChange", "userPassword", "uid")); $attrs = $ldap->fetch (); // Set encryption type to clear if required @@ -124,6 +125,7 @@ function change_password ($dn, $password, $mode=0, $hash= "") // Crypt with the detected Method $test = new $available[$hash]($config); + $test->attrs= $attrs; $newpass = $test->generate_hash($password); } else { -- 2.30.2