diff --git a/lam/HISTORY b/lam/HISTORY
index e2e5d3a6..4a7d1f4a 100644
--- a/lam/HISTORY
+++ b/lam/HISTORY
@@ -1,4 +1,6 @@
August 2008 2.4.0
+ - requires PHP 5.1.2
+ - MHash dependendy replaced by Hash
- save last selected server profile from login page
- lamdaemon: allow to specify SSH port
- lamdaemon: added Syslog logging
diff --git a/lam/INSTALL b/lam/INSTALL
index a4dc2cd6..e6149929 100644
--- a/lam/INSTALL
+++ b/lam/INSTALL
@@ -13,7 +13,6 @@ Installation Instructions for LAM
- OpenLDAP (>2.0)
- A web browser :-)
- MHash is only needed for Samba password hashes.
MCrypt will be used to store your LDAP password encrypted in the session file.
diff --git a/lam/docs/devel/login.htm b/lam/docs/devel/login.htm
index 2a03512a..8211cc57 100644
--- a/lam/docs/devel/login.htm
+++ b/lam/docs/devel/login.htm
@@ -56,8 +56,6 @@ LAM checks if all needed PHP extensions are installed.
- LDAP: PHP needs LDAP
support
- - MHash: needed for
-password creation
- Gettext: needed for
translation
diff --git a/lam/docs/devel/mod_ext.htm b/lam/docs/devel/mod_ext.htm
index c36276c9..3df5c698 100644
--- a/lam/docs/devel/mod_ext.htm
+++ b/lam/docs/devel/mod_ext.htm
@@ -22,7 +22,7 @@ this for you and display an error message at the login page.
style="font-weight: bold; text-decoration: underline;">
The posixAccount module needs
-to generate password hashes. Therefore it needs the MHash extension.
+to generate password hashes. Therefore it needs the Hash extension.
@@ -39,7 +39,7 @@ get_metaData() {
$return = array();
// PHP extensions
$return["extensions"] =
-array("mhash");
+array("hash");
[...]
diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc
index 173cc493..0575dfbc 100644
--- a/lam/lib/baseModule.inc
+++ b/lam/lib/baseModule.inc
@@ -334,7 +334,7 @@ abstract class baseModule {
* Key: extensions
* Value: array of extension names
*
- * Example: "extensions" => array('mhash')
+ * Example: "extensions" => array('hash')
*
*
*
@@ -1142,7 +1142,7 @@ abstract class baseModule {
}
/**
- * This function returns a list of PHP extensions (e.g. mhash) which are needed by this module.
+ * This function returns a list of PHP extensions (e.g. hash) which are needed by this module.
*
* Calling this method does not require the existence of an enclosing {@link accountContainer}.
*
diff --git a/lam/lib/createntlm.inc b/lam/lib/createntlm.inc
index 9784f4cf..4a9a1413 100644
--- a/lam/lib/createntlm.inc
+++ b/lam/lib/createntlm.inc
@@ -349,7 +349,7 @@ private $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12
* @return string hash value
*/
public function nthash($password = "") {
- return strtoupper(bin2hex(mhash(MHASH_MD4, iconv("UTF-8","UTF-16LE",$password))));
+ return strtoupper(hash('md4', iconv("UTF-8","UTF-16LE",$password)));
}
/**
diff --git a/lam/lib/modules/sambaAccount.inc b/lam/lib/modules/sambaAccount.inc
index e463ed7b..caf410eb 100644
--- a/lam/lib/modules/sambaAccount.inc
+++ b/lam/lib/modules/sambaAccount.inc
@@ -116,7 +116,7 @@ class sambaAccount extends baseModule {
'kickoffTime', 'pwdCanChange', 'pwdMustChange', 'acctFlags', 'displayName', 'smbHome', 'homeDrive',
'scriptPath', 'profilePath', 'userWorkstations', 'primaryGroupID', 'domain');
// PHP extensions
- $return['extensions'] = array('mhash', 'iconv');
+ $return['extensions'] = array('hash', 'iconv');
// profile options
if ($this->get_scope() == 'user') {
// set Unix password for Samba
diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc
index b60abb28..9d1d30b8 100644
--- a/lam/lib/modules/sambaSamAccount.inc
+++ b/lam/lib/modules/sambaSamAccount.inc
@@ -141,7 +141,7 @@ class sambaSamAccount extends baseModule {
'displayName', 'sambaHomePath', 'sambaHomeDrive', 'sambaLogonScript', 'sambaProfilePath',
'sambaUserWorkstations', 'sambaPrimaryGroupSID', 'sambaDomainName', 'sambaLogonHours', 'sambaMungedDial');
// PHP extensions
- $return['extensions'] = array('mhash', 'iconv');
+ $return['extensions'] = array('hash', 'iconv');
// profile checks
$return['profile_checks']['sambaSamAccount_smbhome'] = array(
'type' => 'ext_preg',