From a7d3bbd43c3d6fba01e220ab78944adb27f756e6 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 10 Nov 2007 15:16:55 +0000 Subject: [PATCH] enable host passwords (RFE 1754069) --- lam/HISTORY | 1 + lam/lib/modules/posixAccount.inc | 48 ++++++++++++++++---------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/lam/HISTORY b/lam/HISTORY index 2486e5e2..42c92dbf 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -2,6 +2,7 @@ - allow to switch sorting in the account lists - use suffix from account list as default for new accounts (patch 1823583) - Security: passwords in configuration files are now saved as hash values + - Unix: allow to set host passwords (RFE 1754069) 07.11.2007 2.1.0 diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index b207d3ed..558a57f1 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -982,30 +982,6 @@ class posixAccount extends baseModule { ))), array('kind' => 'help', 'value' => 'createhomedir')); } - if (!isset($this->attributes['userPassword'][0])) { - $return[] = array( - array('kind' => 'text', 'text' => _('Password') ), - array('kind' => 'input', 'name' => 'form_subpage_posixAccount_password_open', 'type' => 'submit', 'value' => _('Set password'))); - } - else { - if (pwd_is_enabled($this->attributes['userPassword'][0])) { - $lockOption = array('kind' => 'input', 'name' => 'form_subpage_posixAccount_attributes_lockPassword', 'type' => 'submit', 'value' => _('Lock password')); - } - else { - $lockOption = array('kind' => 'input', 'name' => 'form_subpage_posixAccount_attributes_unlockPassword', 'type' => 'submit', 'value' => _('Unlock password')); - } - $return[] = array( - array('kind' => 'text', 'text' => _('Password') ), - array('kind' => 'table', 'value' => array( - array( - array('kind' => 'input', 'name' => 'form_subpage_posixAccount_password_open', 'type' => 'submit', 'value' => _('Change password')) - ), - array($lockOption), - array( - array('kind' => 'input', 'name' => 'form_subpage_posixAccount_attributes_removePassword', 'type' => 'submit', 'value' => _('Remove password')) - ) - ))); - } if (count($shelllist)!=0) { $return[] = array( array('kind' => 'text', 'text' => _('Login shell').'*'), @@ -1013,6 +989,30 @@ class posixAccount extends baseModule { array('kind' => 'help', 'value' => 'loginShell')); } } + if (!isset($this->attributes['userPassword'][0])) { + $return[] = array( + array('kind' => 'text', 'text' => _('Password') ), + array('kind' => 'input', 'name' => 'form_subpage_posixAccount_password_open', 'type' => 'submit', 'value' => _('Set password'))); + } + else { + if (pwd_is_enabled($this->attributes['userPassword'][0])) { + $lockOption = array('kind' => 'input', 'name' => 'form_subpage_posixAccount_attributes_lockPassword', 'type' => 'submit', 'value' => _('Lock password')); + } + else { + $lockOption = array('kind' => 'input', 'name' => 'form_subpage_posixAccount_attributes_unlockPassword', 'type' => 'submit', 'value' => _('Unlock password')); + } + $return[] = array( + array('kind' => 'text', 'text' => _('Password') ), + array('kind' => 'table', 'value' => array( + array( + array('kind' => 'input', 'name' => 'form_subpage_posixAccount_password_open', 'type' => 'submit', 'value' => _('Change password')) + ), + array($lockOption), + array( + array('kind' => 'input', 'name' => 'form_subpage_posixAccount_attributes_removePassword', 'type' => 'submit', 'value' => _('Remove password')) + ) + ))); + } return $return; }