From 7f794f2bb079c1a5bb0fdebb815921c168c00e90 Mon Sep 17 00:00:00 2001 From: Roy Date: Wed, 13 Aug 2008 17:27:38 +0100 Subject: [vty] Allow delete during password entry 2008-08-13 roy * 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 --- lib/vty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/vty.c b/lib/vty.c index ccf66406..32084713 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -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); -- cgit v1.2.1