summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d5a950)
raw | patch | inline | side by side (parent: 3d5a950)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Jul 2010 07:13:14 +0000 (07:13 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Jul 2010 07:13:14 +0000 (07:13 +0000) |
-Do not expire admin accounts
-Fixed class_password.inc to only use expiry if it is enabled.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@18939 594d385d-05f5-0310-b6e9-bd551577e9d8
-Fixed class_password.inc to only use expiry if it is enabled.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@18939 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history | |
gosa-core/plugins/personal/password/class_password.inc | patch | blob | history |
index 5052f921d3eef044bd072221a27141b6ad81e37d..805acec79ea562593927625ec8e82db762fa72cd 100644 (file)
*/
function ldap_expired_account($config, $userdn, $uid)
{
+
+ // Skip this for the admin account, we do not want to lock him out.
+ if($uid == 'admin') return(0);
+
$ldap= $config->get_ldap_link();
$ldap->cd($config->current['BASE']);
$ldap->cat($userdn);
$attrs= $ldap->fetch();
$current= floor(date("U") /60 /60 /24);
-
// Fetch required attributes
foreach(array('shadowExpire','shadowLastChange','shadowMax','shadowMin',
'shadowInactive','shadowWarning') as $attr){
}
}
- return(NULL);
+ return(0);
}
diff --git a/gosa-core/plugins/personal/password/class_password.inc b/gosa-core/plugins/personal/password/class_password.inc
index 7006dc7772fdbb561bed6046677dc57684138079..c8540ae224724397670994717c230bedcf5c5c3c 100644 (file)
$smarty->assign("NotAllowed" , !preg_match("/w/i",$password_ACLS));
/* Display expiration template */
+ $smarty->assign("passwordExpired", FALSE);
if ($this->config->get_cfg_value("handleExpiredAccounts") == "true"){
$expired= ldap_expired_account($this->config, $ui->dn, $ui->username);
+ $smarty->assign("passwordExpired", $expired & POSIX_FORCE_PASSWORD_CHANGE);
if($expired == POSIX_DISALLOW_PASSWORD_CHANGE){
return($smarty->fetch(get_template_path("nochange.tpl", TRUE)));
}
$smarty->assign("proposalEnabled" , $this->proposalEnabled);
$smarty->assign("proposalSelected" , $this->proposalSelected);
- $smarty->assign("passwordExpired", ldap_expired_account($this->config, $ui->dn, $ui->uid) & POSIX_FORCE_PASSWORD_CHANGE);
if(isset($_POST['proposalSelected'])) $this->proposalSelected = get_post('proposalSelected') == 1;