1 # Copyright 2000, International Business Machines Corporation and others.
4 # This software has been released under the terms of the IBM Public
5 # License. For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
8 # Quickly tests a subset of the authentication attempts limits changes to the
11 # invent a bunch of temporary users (delete, then create them)
12 # setfields their attempts and locktimes: Note -- I don't verify that
13 # kas exam reports the correct thing as doing the conversion from text
14 # to numeric and the math and the conversion in expect would be more likely
15 # to be wrong than the C code in admin_tools.c and kaprocs.c and kaauxdb.c
17 # fail to authenticate once
18 # verify that klog does not report locked
19 # verify that exam reports not locked
20 # fail to authenticate many times - 1.
21 # verify that klog does not report locked
22 # verify that exam reports locked (unless -attempts is 0)
23 # fail to authenticate once more.
24 # verify that klog does report locked (unless -attempts is 0)
25 # verify that exam reports locked (unless -attempts is 0)
27 # check that kas unlock works (implicit)
28 # check that the correct # of attempts remain after some # of failures? (implicit)
29 source testlocking.utils.tcl
31 for { set i
0 } { $i<10 } { set i
[expr $i+1] } {
36 verify_auto_reset
$usr
38 for { set i
9 } { $i>=0 } { set i
[expr $i-1] } {
41 spawn
$kas setfields
$usr -attempts $i -locktime [expr $i*10] -admin_user $admin -password_for_admin $adminpass -cell $cell
45 verify_attempts
$usr $i