Code

Updated language detection code
[gosa.git] / include / class_password-methods-kerberos.inc
index d1c7757825982638be9d18d51785869c49640bb3..2023f6c84953403ef6328316607778b7b29febd4 100644 (file)
@@ -23,6 +23,7 @@ class passwordMethodkerberos extends passwordMethod
 
        function passwordMethodkerberos($config)  
        {
+    $this->config=$config;
        }
 
   function is_available()
@@ -52,7 +53,7 @@ class passwordMethodkerberos extends passwordMethod
                                print_red (_("Kerberos database communication failed!"));
                        }
 
-                       $ret= kadm5_chpass_principal($handle, $this->attrs['uid'][0]."@".$cfg['REALM'],$password);
+                       $ret= kadm5_chpass_principal($handle, $this->attrs['uid'][0]."@".$cfg['REALM'],$pwd);
 
                        if ($ret === FALSE)
                        {
@@ -61,12 +62,17 @@ class passwordMethodkerberos extends passwordMethod
 
                        kadm5_destroy($handle);
 
-                       $newpass= "{kerberos}".$this->attrs['uid'][0]."@".$cfg['REALM'];
+                       $newpass= "{".$this->config->current['KRBSASL']."}".$this->attrs['uid'][0]."@".$cfg['REALM'];
 
                        return $newpass;       
                }
        }
 }
 
+/* Dummy class for OpenLDAP Kerberos/SASL change  */
+class passwordMethodsasl extends passwordMethodkerberos
+{
+}
+
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>