Changeset 47

Show
Ignore:
Timestamp:
05/22/07 22:18:36 (2 years ago)
Author:
csellers
Message:

enforce upper limit of deny when using deny_interval. This upper limit is actually TALLYLOG_FAIL_TIME_COUNT (not one less as previously noted).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RHEL5/pam_tally2/README

    r43 r47  
    2424                 
    2525                * deny_interval=n (Only deny access if tally for this user 
    26                        exceeds limit within n second time interval. Requires 
    27                        deny=8 or less.) 
     26                        exceeds limit within n second time interval. Requires 
     27                        deny=9 or less.) 
    2828                 
    2929                * lock_time=n (Deny access for n seconds after every failed 
  • trunk/RHEL5/pam_tally2/pam_tally.c

    r46 r47  
    594594    tally.fail_time[last_fail] = time(NULL); 
    595595 
     596    if (opts->deny_interval && opts->deny > TALLYLOG_FAIL_TIME_COUNT) { 
     597      pam_syslog(pamh, LOG_ALERT, 
     598      "warning: deny cannot be greater than: %d when using deny_interval", 
     599      TALLYLOG_FAIL_TIME_COUNT); 
     600      opts->deny = TALLYLOG_FAIL_TIME_COUNT; 
     601    } 
     602 
    596603    while (opts->deny_interval && 
    597604           tally.fail_cnt < opts->deny &&