summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh.c
diff options
context:
space:
mode:
authorPascal Mathis <mail@pascalmathis.com>2018-05-11 02:54:30 +0200
committerPascal Mathis <mail@pascalmathis.com>2018-05-11 02:54:30 +0200
commit322e2d5c694449ee604c339abb0e9fc14babdc45 (patch)
treee01e1593b288d4d2f6b9d2304f8465e243cd9793 /vtysh/vtysh.c
parentMerge pull request #2195 from qlyoung/docuser (diff)
downloadfrr-322e2d5c694449ee604c339abb0e9fc14babdc45.tar.xz
frr-322e2d5c694449ee604c339abb0e9fc14babdc45.zip
lib: Ported 'no (enable) password' from stable/3.0
The pull request #1545 from @donaldsharp introduced the command 'no password' to remove an existing terminal connection password. Additionally, warnings have been added to both 'no password' and 'no enable password' to make the user aware of any security implications. It seems that this specific pull request was never merged against master and got lost. This commit is a cherry-pick of d4961273cb with fixed conflicts and updated documentation. Thanks to @donaldsharp and @pogojotz for the original PR. Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r--vtysh/vtysh.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 867dc9cd1..7397089a7 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -2361,13 +2361,20 @@ DEFUNSH(VTYSH_ALL, no_vtysh_service_password_encrypt,
DEFUNSH(VTYSH_ALL, vtysh_config_password, vtysh_password_cmd,
"password [(8-8)] LINE",
- "Assign the terminal connection password\n"
+ "Modify the terminal connection password\n"
"Specifies a HIDDEN password will follow\n"
"The password string\n")
{
return CMD_SUCCESS;
}
+DEFUNSH(VTYSH_ALL, no_vtysh_config_password, no_vtysh_password_cmd,
+ "no password", NO_STR
+ "Modify the terminal connection password\n")
+{
+ return CMD_SUCCESS;
+}
+
DEFUNSH(VTYSH_ALL, vtysh_config_enable_password, vtysh_enable_password_cmd,
"enable password [(8-8)] LINE",
"Modify enable password parameters\n"
@@ -3605,6 +3612,7 @@ void vtysh_init_vty(void)
install_element(CONFIG_NODE, &no_vtysh_service_password_encrypt_cmd);
install_element(CONFIG_NODE, &vtysh_password_cmd);
+ install_element(CONFIG_NODE, &no_vtysh_password_cmd);
install_element(CONFIG_NODE, &vtysh_enable_password_cmd);
install_element(CONFIG_NODE, &no_vtysh_enable_password_cmd);
}