29 lines
814 B
Diff
29 lines
814 B
Diff
From afb661b80441b6e3fa8cfa3b69f50e4805ebf8be Mon Sep 17 00:00:00 2001
|
|
From: Vitezslav Crhonek <vcrhonek@redhat.com>
|
|
Date: Mon, 14 May 2018 11:21:45 +0200
|
|
Subject: [PATCH] Fix infinite loop of vlock if locked VC is closed
|
|
|
|
---
|
|
src/vlock/auth.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/vlock/auth.c b/src/vlock/auth.c
|
|
index 25efb5e..4cbc685 100644
|
|
--- a/src/vlock/auth.c
|
|
+++ b/src/vlock/auth.c
|
|
@@ -140,9 +140,9 @@ int get_password(pam_handle_t *pamh, const char *username, const char *tty)
|
|
fflush(stdout);
|
|
/*
|
|
* EOF encountered on read?
|
|
- * If not on VT, check stdin.
|
|
+ * Check stdin.
|
|
*/
|
|
- if (is_vt || isatty(STDIN_FILENO)) {
|
|
+ if (isatty(STDIN_FILENO)) {
|
|
/* Ignore error. */
|
|
sleep(SHORT_DELAY);
|
|
break;
|
|
--
|
|
2.21.0.windows.1
|
|
|