File: 50_remove-hardcoded-sleep.patch

package info (click to toggle)
vlock 2.2.2-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 580 kB
  • sloc: ansic: 2,946; sh: 871; makefile: 208
file content (25 lines) | stat: -rw-r--r-- 658 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Forwarded: not-needed
Last-Update: 2025-09-27
Author: Kirill Rekhov <krekhov.dev@gmail.com>
Bug-Debian: https://bugs.debian.org/527451
Description: Remove hardcoded sleep(1); Rely on PAM faildelay for throttling

--- a/src/vlock-main.c
+++ b/src/vlock-main.c
@@ -168,16 +168,12 @@ static void auth_loop(const char *username)
     /* 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