Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/loginutils/vlock.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/loginutils/vlock.c
r2725 r3232 15 15 /* Fixed by Erik Andersen to do passwords the tinylogin way... 16 16 * It now works with md5, sha1, etc passwords. */ 17 18 //usage:#define vlock_trivial_usage 19 //usage: "[-a]" 20 //usage:#define vlock_full_usage "\n\n" 21 //usage: "Lock a virtual terminal. A password is required to unlock.\n" 22 //usage: "\n -a Lock all VTs" 17 23 18 24 #include "libbb.h" … … 94 100 tcsetattr_stdin_TCSANOW(&term); 95 101 96 do{102 while (1) { 97 103 printf("Virtual console%s locked by %s.\n", 98 option_mask32 /*o_lock_all*/ ? "s" : "", 99 pw->pw_name); 104 /* "s" if -a, else "": */ "s" + !option_mask32, 105 pw->pw_name 106 ); 100 107 if (correct_password(pw)) { 101 108 break; 102 109 } 103 bb_do_delay( FAIL_DELAY);104 puts(" Password incorrect");105 } while (1);110 bb_do_delay(LOGIN_FAIL_DELAY); 111 puts("Incorrect password"); 112 } 106 113 107 114 #ifdef __linux__
Note:
See TracChangeset
for help on using the changeset viewer.