Merge branch 'develop' of git@github.com:LDAPAccountManager/lam.git into develop

This commit is contained in:
Roland Gruber 2018-12-28 13:42:52 +01:00
commit 87e47ae9b1
10 changed files with 14 additions and 15 deletions

View File

@ -1,8 +1,8 @@
ldap-account-manager (6.6.RC1-1) unstable; urgency=medium
ldap-account-manager (6.6-1) unstable; urgency=medium
* new upstream release
-- Roland Gruber <post@rolandgruber.de> Mon, 10 Dec 2018 17:05:32 +0100
-- Roland Gruber <post@rolandgruber.de> Fri, 28 Dec 2018 11:08:14 +0100
ldap-account-manager (6.5-1) unstable; urgency=medium

View File

@ -1,4 +1,4 @@
December 2018 6.6
28.12.2018 6.6
- New import/export in tools menu
- YubiKey support
- Windows users:

View File

@ -1 +1 @@
6.6.RC1
6.6

View File

@ -240,7 +240,7 @@ function generateSalt($len) {
*/
function pwd_enable($hash) {
// check if password is disabled (old wrong LAM method)
if ((substr($hash, 0, 2) == "!{") || ((substr($hash, 0, 2) == "*{"))) {
if ((substr($hash, 0, 2) == "!{") || (substr($hash, 0, 2) == "*{")) {
return substr($hash, 1, strlen($hash));
}
// check for "!" or "*" at beginning of password hash
@ -269,7 +269,7 @@ function pwd_enable($hash) {
*/
function pwd_disable($hash) {
// check if password is disabled (old wrong LAM method)
if ((substr($hash, 0, 2) == "!{") || ((substr($hash, 0, 2) == "*{"))) {
if ((substr($hash, 0, 2) == "!{") || (substr($hash, 0, 2) == "*{")) {
return $hash;
}
// check for "!" or "*" at beginning of password hash
@ -316,7 +316,7 @@ function pwd_is_lockable($password) {
*/
function pwd_is_enabled($hash) {
// disabled passwords have a "!" or "*" at the beginning (old wrong LAM method)
if ((substr($hash, 0, 2) == "!{") || ((substr($hash, 0, 2) == "*{"))) {
if ((substr($hash, 0, 2) == "!{") || (substr($hash, 0, 2) == "*{")) {
return false;
}
if (substr($hash, 0, 1) == "{") {

View File

@ -156,7 +156,7 @@ class Ldap{
$dir = @opendir($tmpDir);
$file = @readdir($dir);
while ($file) {
if ((substr($file, -4) == '.tmp')) {
if (substr($file, -4) == '.tmp') {
$path = $tmpDir . $file;
if ($time - filemtime($path) > (3600 * 24)) {
@unlink($path);

View File

@ -1141,7 +1141,7 @@ class accountContainer {
$pwdMailCheckbox->setTableRowsToShow(array('lamPasswordChangeSendMailAddress'));
$container->addElement($pwdMailCheckbox);
$container->addElement(new htmlHelpLink('407'), true);
if (($_SESSION['config']->getLamProMailAllowAlternateAddress() != 'false')) {
if ($_SESSION['config']->getLamProMailAllowAlternateAddress() != 'false') {
$alternateMail = '';
$pwdResetModule = $this->getAccountModule('passwordSelfReset');
if (!empty($pwdResetModule)) {

View File

@ -324,7 +324,7 @@ class asteriskVoicemail extends baseModule implements passwordService {
$errors[] = $this->messages['AstVoicemailMailbox'][1];
}
// check for duplicate Voicemail ID
else if (!isset($this->orig['AstVoicemailMailbox'][0]) || (($this->orig['AstVoicemailMailbox'][0] != $this->attributes['AstVoicemailMailbox'][0]))) {
else if (!isset($this->orig['AstVoicemailMailbox'][0]) || ($this->orig['AstVoicemailMailbox'][0] != $this->attributes['AstVoicemailMailbox'][0])) {
$entries = searchLDAPByAttribute('AstVoicemailMailbox', $this->attributes['AstVoicemailMailbox'][0], 'AstVoicemailMailbox', array('dn'), array('user'));
if (sizeof($entries) > 0) {
$errors[] = $this->messages['AstVoicemailMailbox'][2];

View File

@ -2030,7 +2030,7 @@ class posixAccount extends baseModule implements passwordService {
// login shell
$return->add(new htmlResponsiveSelect('posixAccount_loginShell', $shelllist, array("/bin/bash"), _('Login shell'), 'loginShell'), 12);
// lamdaemon settings
if (($_SESSION['config']->get_scriptPath() != null)) {
if ($_SESSION['config']->get_scriptPath() != null) {
$return->add(new htmlSubTitle(_('Create home directory')), 12);
$lamdaemonServers = explode(";", $_SESSION['config']->get_scriptServers());
for ($i = 0; $i < sizeof($lamdaemonServers); $i++) {

View File

@ -592,8 +592,8 @@ class shadowAccount extends baseModule implements passwordService {
'digit', $this->messages['shadowMax'][1], $messages);
// minAge <= maxAge
if ((($rawAccounts[$i][$ids['shadowAccount_minAge']] != '') || ($rawAccounts[$i][$ids['shadowAccount_maxAge']] != '')) && // if at least one is set
(($rawAccounts[$i][$ids['shadowAccount_minAge']] == '') || ($rawAccounts[$i][$ids['shadowAccount_maxAge']] == '') || ( // and one is not set
($rawAccounts[$i][$ids['shadowAccount_minAge']] > $rawAccounts[$i][$ids['shadowAccount_maxAge']])))) { // or minAge > maxAge
(($rawAccounts[$i][$ids['shadowAccount_minAge']] == '') || ($rawAccounts[$i][$ids['shadowAccount_maxAge']] == '') || // and one is not set
($rawAccounts[$i][$ids['shadowAccount_minAge']] > $rawAccounts[$i][$ids['shadowAccount_maxAge']]))) { // or minAge > maxAge
$errMsg = $this->messages['shadow_cmp'][1];
array_push($errMsg, array($i));
$messages[] = $errMsg;

View File

@ -1,5 +1,4 @@
<?php
use LAM\ImageUtils\ImageManipulationFactory;
/*
@ -1169,7 +1168,7 @@ class lamUserList extends lamList {
* @return boolean Unix part locked
*/
public static function isUnixLocked(&$attrs) {
return ((isset($attrs['userpassword'][0]) && !pwd_is_enabled($attrs['userpassword'][0])));
return (isset($attrs['userpassword'][0]) && !pwd_is_enabled($attrs['userpassword'][0]));
}
/**