diff options
author | Roy <quagga@de.vio.us> | 2008-08-13 17:27:38 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2008-08-22 19:52:57 +0100 |
commit | 7f794f2bb079c1a5bb0fdebb815921c168c00e90 (patch) | |
tree | 7107c63dc002db8b76fc1d6b6e3dea0ca25a035e /lib | |
parent | fe86b484e2303103107a6ec7fc02e4e0acaf31c7 (diff) |
[vty] Allow delete during password entry
2008-08-13 roy <quagga@de.vio.us>
* lib/vty.c: (vty_delete_char) move check for authentication
down a bit, so we do the delete, but still not re-write of line.
Signed-off-by: Paul Jakma <paul@quagga.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vty.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -727,9 +727,6 @@ vty_delete_char (struct vty *vty) int i; int size; - if (vty->node == AUTH_NODE || vty->node == AUTH_ENABLE_NODE) - return; - if (vty->length == 0) { vty_down_level (vty); @@ -744,6 +741,9 @@ vty_delete_char (struct vty *vty) vty->length--; memmove (&vty->buf[vty->cp], &vty->buf[vty->cp + 1], size - 1); vty->buf[vty->length] = '\0'; + + if (vty->node == AUTH_NODE || vty->node == AUTH_ENABLE_NODE) + return; vty_write (vty, &vty->buf[vty->cp], size - 1); vty_write (vty, &telnet_space_char, 1); |