replaced MHash by Hash

This commit is contained in:
Roland Gruber 2008-08-09 11:18:36 +00:00
parent 66e40c7222
commit 80e50fe725
8 changed files with 9 additions and 10 deletions

View File

@ -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

View File

@ -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.

View File

@ -56,8 +56,6 @@ LAM checks if all needed PHP extensions are installed.<br>
<ul>
<li><span style="font-weight: bold;">LDAP:</span> PHP needs LDAP
support</li>
<li><span style="font-weight: bold;">MHash:</span> needed for
password creation</li>
<li><span style="font-weight: bold;">Gettext:</span> needed for
translation<br>
</li>

View File

@ -22,7 +22,7 @@ this for you and display an error message at the login page.<br>
style="font-weight: bold; text-decoration: underline;">
<br>
The <span style="font-style: italic;">posixAccount</span> module needs
to generate password hashes. Therefore it needs the MHash extension.<br>
to generate password hashes. Therefore it needs the Hash extension.<br>
<br>
<table style="width: 100%; text-align: left;" class="mod-code"
border="0" cellpadding="2" cellspacing="2">
@ -39,7 +39,7 @@ get_metaData() {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // PHP extensions<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return["extensions"] =
array("mhash");<br>
array("hash");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [...]<br>
</td>
</tr>

View File

@ -334,7 +334,7 @@ abstract class baseModule {
* <b>Key:</b> extensions<br>
* <b>Value:</b> array of extension names<br>
* <br>
* <b>Example:</b> "extensions" => array('mhash')
* <b>Example:</b> "extensions" => array('hash')
* <br><br>
* </li>
*
@ -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}.
*

View File

@ -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)));
}
/**

View File

@ -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

View File

@ -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',