Skip to contentSkip to conversation

vlock: rename ERROR_TIMEOUT macro to LONG_DELAY

PATCH In review Dmitry V. Levin 1 participant 1 message Nov 24, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 vlock: rename ERROR_TIMEOUT macro to LONG_DELAY

The name ERROR_TIMEOUT is somewhat misleading: PAM errors may vary, and some may require longer delays than others. Since ERROR_TIMEOUT means longer delay, rename it to LONG_DELAY.

---
 src/vlock/auth.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
src/vlock/auth.c +4 -4
index cac877c..76945c0 100644
@@ -33,8 +33,8 @@
 #include "vlock.h"
 #include "nls.h"
 
-/* Unrecognized PAM error timeout. */
-#define	ERROR_TIMEOUT	10
+/* Delay after fatal PAM errors, in seconds. */
+#define	LONG_DELAY	10
 
 static int
 do_account_password_management (pam_handle_t *pamh)
@@ -76,7 +76,7 @@ get_password (pam_handle_t * pamh, const char *username, const char *tty)
 					tty, username, uid);
 				puts (_("Please try again later.\n\n\n"));
 				fflush (stdout);
-				sleep (ERROR_TIMEOUT);
+				sleep (LONG_DELAY);
 				continue;
 			}
 		}
@@ -156,7 +156,7 @@ get_password (pam_handle_t * pamh, const char *username, const char *tty)
 				msg = 0;
 				pam_end (pamh, rc);
 				pamh = 0;
-				sleep (ERROR_TIMEOUT);
+				sleep (LONG_DELAY);
 				break;
 
 			default:
Signature · 1 line
ldv