Ignore:
Timestamp:
01/18/10 05:10:53 (14 years ago)
Author:
nanardon
Message:
  • account authentication take care of expiration date and locked account
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm

    r598 r650  
    478478        return; 
    479479    }; 
     480    if (my $expire = $uobj->_get_c_field('shadowExpire')) { 
     481        if ($expire > 0 && $expire < int(time / ( 3600 * 24 ))) { 
     482            la_log(LA_ERR, "Account $username has expired (%d / %d)", 
     483                $expire, int(time / ( 3600 * 24 ))); 
     484            return; 
     485        } 
     486    } 
     487 
     488    if ($uobj->_get_c_field('locked')) { 
     489        la_log(LA_ERR, "Account $username is currently locked"); 
     490        return; 
     491    } 
     492 
    480493    my $password = $uobj->_get_c_field('userPassword') or do { 
    481494        la_log(LA_ERR, "Cannot authenticate user $username having no passwd"); 
Note: See TracChangeset for help on using the changeset viewer.