From 060d438cb1be51d2f7fb7954a8b7b1cd491f555f Mon Sep 17 00:00:00 2001 From: hasso Date: Wed, 9 Mar 2005 12:41:14 +0000 Subject: * vtysh_config.c: Move password commands to the AAA_NODE. It quarantees that they will appear after SERVICE_NODE to make sure that encrypted passwords will work ("service password-encryption" command). [backport candidate] --- vtysh/vtysh_config.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'vtysh/vtysh_config.c') diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index c7be8d26..14efa486 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -240,14 +240,14 @@ vtysh_config_parse_line (const char *line) config = config_get (SERVICE_NODE, line); else if (strncmp (line, "debug", strlen ("debug")) == 0) config = config_get (DEBUG_NODE, line); + else if (strncmp (line, "password", strlen ("password")) == 0 + || strncmp (line, "enable password", + strlen ("enable password")) == 0) + config = config_get (AAA_NODE, line); else { if (strncmp (line, "log", strlen ("log")) == 0 || strncmp (line, "hostname", strlen ("hostname")) == 0 - || strncmp (line, "password", strlen ("password")) == 0 - || strncmp (line, "enable password", - strlen ("enable password")) == 0 - || strncmp (line, "service", strlen ("service")) == 0 ) config_add_line_uniq (config_top, line); else @@ -287,7 +287,8 @@ vtysh_config_parse (char *line) ((I) == ACCESS_NODE || (I) == PREFIX_NODE || (I) == IP_NODE \ || (I) == AS_LIST_NODE || (I) == COMMUNITY_LIST_NODE || \ (I) == ACCESS_IPV6_NODE || (I) == PREFIX_IPV6_NODE \ - || (I) == SERVICE_NODE || (I) == FORWARDING_NODE || (I) == DEBUG_NODE) + || (I) == SERVICE_NODE || (I) == FORWARDING_NODE || (I) == DEBUG_NODE \ + || (I) == AAA_NODE) /* Display configuration to file pointer. */ void -- cgit v1.2.1