From 12edc0beca07edf0a1bdd6fd77d0a242b49931b9 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 30 Jun 2006 09:41:54 +0000 Subject: [PATCH] fixed silent unlocking of passwords --- lam/HISTORY | 1 + lam/lib/modules/posixGroup.inc | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lam/HISTORY b/lam/HISTORY index ecd6d95f..51796ea7 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -2,6 +2,7 @@ - fixed bugs: -> Kolab: fixed problem with message about missing password -> Unix groups: fixed auto GID + -> Unix users/groups: fixed silent unlocking of passwords -> Shadow: account expiration date was incorrect in some time zones -> User list: fixed problems when deleting users and translated GIDs are activated (1503367) diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index 2668f4c2..e6fb85ec 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -751,6 +751,21 @@ class posixGroup extends baseModule { if (sizeof($messages) > 0) return $messages; } + /** + * This function loads all needed LDAP attributes. + * + * @param array $attr list of attributes + */ + function load_attributes($attr) { + parent::load_attributes($attr); + // set password options + if (!isset($this->attributes['userPassword'][0])) $this->userPassword_nopassword = true; + else { + if (pwd_is_enabled($this->attributes['userPassword'][0])) $this->userPassword_lock = false; + else $this->userPassword_lock = true; + } + } + /* This function returns an array with 3 entries: * array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) * DN is the DN to change. It may be possible to change several DNs,