Samba history support

This commit is contained in:
Roland Gruber 2016-05-27 21:17:22 +02:00
parent 6089935a71
commit 1e9a5bd74c
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
June 2016 5.4 June 2016 5.4
- Unix: support magic numbers for UIDs/GIDs (e.g. 389 server DNA plugin) - Unix: support magic numbers for UIDs/GIDs (e.g. 389 server DNA plugin)
- Samba 3: support for Samba password history
- LAM Pro: - LAM Pro:
-> New module for 389ds unlocking and deactivation status -> New module for 389ds unlocking and deactivation status
-> Self registration: support for Google reCAPTCHA -> Self registration: support for Google reCAPTCHA

View File

@ -2489,12 +2489,13 @@ class sambaSamAccount extends baseModule implements passwordService {
* *
* @param String $password new password * @param String $password new password
*/ */
private static function oldPasswordUsed($password, $attributes, $sambaDomain) { public static function oldPasswordUsed($password, $attributes, $sambaDomain) {
if (empty($attributes['sambaPasswordHistory'][0]) || ($sambaDomain == null) $attributes = array_change_key_case($attributes, CASE_LOWER);
if (empty($attributes['sambapasswordhistory'][0]) || ($sambaDomain == null)
|| !is_numeric($sambaDomain->pwdHistoryLength) || ($sambaDomain->pwdHistoryLength < 1)) { || !is_numeric($sambaDomain->pwdHistoryLength) || ($sambaDomain->pwdHistoryLength < 1)) {
return false; return false;
} }
foreach ($attributes['sambaPasswordHistory'] as $historyEntry) { foreach ($attributes['sambapasswordhistory'] as $historyEntry) {
if (sambaSamAccount::validateHistoryEntry($password, $historyEntry)) { if (sambaSamAccount::validateHistoryEntry($password, $historyEntry)) {
return true; return true;
} }