bool warned = false;
if (host.password) {
- vty_out(vty,
- "Please be aware that removing the password is a security risk and "
- "you should think twice about this command\n");
- warned = true;
+ if (!vty_shell_serv(vty)) {
+ vty_out(vty,
+ "Please be aware that removing the password is "
+ "a security risk and you should think twice "
+ "about this command\n");
+ warned = true;
+ }
XFREE(MTYPE_HOST, host.password);
}
host.password = NULL;
if (host.password_encrypt) {
- if (!warned)
+ if (!warned && !vty_shell_serv(vty))
vty_out(vty,
- "Please be aware that removing the password is a security risk "
- "and you should think twice about this command\n");
+ "Please be aware that removing the password is "
+ "a security risk and you should think twice "
+ "about this command\n");
XFREE(MTYPE_HOST, host.password_encrypt);
}
host.password_encrypt = NULL;
bool warned = false;
if (host.enable) {
- vty_out(vty,
- "Please be aware that removing the password is a security risk and "
- "you should think twice about this command\n");
- warned = true;
+ if (!vty_shell_serv(vty)) {
+ vty_out(vty,
+ "Please be aware that removing the password is "
+ "a security risk and you should think twice "
+ "about this command\n");
+ warned = true;
+ }
XFREE(MTYPE_HOST, host.enable);
}
host.enable = NULL;
if (host.enable_encrypt) {
- if (!warned)
+ if (!warned && !vty_shell_serv(vty))
vty_out(vty,
- "Please be aware that removing the password is a security risk "
- "and you should think twice about this command\n");
+ "Please be aware that removing the password is "
+ "a security risk and you should think twice "
+ "about this command\n");
XFREE(MTYPE_HOST, host.enable_encrypt);
}
host.enable_encrypt = NULL;
"no password", NO_STR
"Modify the terminal connection password\n")
{
+ vty_out(vty,
+ "Please be aware that removing the password is a security risk "
+ "and you should think twice about this command\n");
+
return CMD_SUCCESS;
}
"Modify enable password parameters\n"
"Assign the privileged level password\n")
{
+ vty_out(vty,
+ "Please be aware that removing the password is a security risk "
+ "and you should think twice about this command\n");
+
return CMD_SUCCESS;
}