Package: vlock Version: 2.2.2-3 Severity: wishlist Tags: patch
Please do not use sleep() for delay after unsucessful authentication. It can be replaced (and customized in runtime) by the pam_faildelay module.
Patch attached. -- Piotr Lewandowski
diff -r 36d102783b23 debian/vlock.pam --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/vlock.pam Thu May 07 17:33:37 2009 +0200 @@ -0,0 +1,2 @@ +auth optional pam_faildelay.so delay=1000000 +...@include common-auth diff -r 36d102783b23 src/vlock-main.c --- a/src/vlock-main.c Thu May 07 16:44:55 2009 +0200 +++ b/src/vlock-main.c Thu May 07 17:33:37 2009 +0200 @@ -168,16 +168,12 @@ /* Try authentication as user. */ if (auth(username, prompt_timeout)) break; - else - sleep(1); #ifndef NO_ROOT_PASS if (strcmp(username, "root") != 0) { /* Try authentication as root. */ if (auth("root", prompt_timeout)) break; - else - sleep(1); } #endif