diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-09-23 13:11:49 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-09-23 13:11:49 +0000 |
commit | faf64b2b268014d7076a2aeb58a823f45ca9218c (patch) | |
tree | c99eb90ceea7adfebc157ca28a45cf9ae81b4a57 /loginutils | |
parent | f70446b9182357f44f607f5923ac2eb49c4af12c (diff) | |
download | busybox-w32-faf64b2b268014d7076a2aeb58a823f45ca9218c.tar.gz busybox-w32-faf64b2b268014d7076a2aeb58a823f45ca9218c.tar.bz2 busybox-w32-faf64b2b268014d7076a2aeb58a823f45ca9218c.zip |
correct_password: undo whitespace damage.
vlock + correct_password: fix incorrect line breaks in messages.
git-svn-id: svn://busybox.net/trunk/busybox@16201 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/su.c | 2 | ||||
-rw-r--r-- | loginutils/vlock.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/loginutils/su.c b/loginutils/su.c index ff6643e60..c51359ae1 100644 --- a/loginutils/su.c +++ b/loginutils/su.c | |||
@@ -45,7 +45,7 @@ int su_main(int argc, char **argv) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | pw = getpwnam(opt_username); | 47 | pw = getpwnam(opt_username); |
48 | if (!pw) bb_error_msg_and_die("Unknown id: %s", opt_username); | 48 | if (!pw) bb_error_msg_and_die("unknown id: %s", opt_username); |
49 | 49 | ||
50 | /* Make sure pw->pw_shell is non-NULL. It may be NULL when NEW_USER | 50 | /* Make sure pw->pw_shell is non-NULL. It may be NULL when NEW_USER |
51 | is a username that is retrieved via NIS (YP), but that doesn't have | 51 | is a username that is retrieved via NIS (YP), but that doesn't have |
diff --git a/loginutils/vlock.c b/loginutils/vlock.c index b4426ad41..564b6d527 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c | |||
@@ -108,13 +108,12 @@ int vlock_main(int argc, char **argv) | |||
108 | tcsetattr(STDIN_FILENO, TCSANOW, &term); | 108 | tcsetattr(STDIN_FILENO, TCSANOW, &term); |
109 | 109 | ||
110 | do { | 110 | do { |
111 | printf("Virtual Console%s locked.\n%s's ", (o_lock_all) ? "s" : "", pw->pw_name); | 111 | printf("Virtual Console%s locked. Enter %s's password to unlock\n", (o_lock_all) ? "s" : "", pw->pw_name); |
112 | fflush(stdout); | 112 | if (correct_password(pw)) { |
113 | if (correct_password (pw)) { | ||
114 | break; | 113 | break; |
115 | } | 114 | } |
116 | bb_do_delay(FAIL_DELAY); | 115 | bb_do_delay(FAIL_DELAY); |
117 | puts("Password incorrect."); | 116 | puts("Password incorrect"); |
118 | } while (1); | 117 | } while (1); |
119 | restore_terminal(); | 118 | restore_terminal(); |
120 | return 0; | 119 | return 0; |