]> git.proxmox.com Git - mirror_frr.git/commit - lib/command.c
lib: Improved warnings for 'no (enable) password'
authorPascal Mathis <mail@pascalmathis.com>
Sat, 12 May 2018 18:19:49 +0000 (20:19 +0200)
committerPascal Mathis <mail@pascalmathis.com>
Sat, 12 May 2018 20:22:09 +0000 (22:22 +0200)
commiteb83f7ce842944518bac726c19eb071257a2ed56
tree5dafb412282441bb3eb53b143cce5d6e48758468
parent05859298a3979eaa1a802174128b3342be47c7b1
lib: Improved warnings for 'no (enable) password'

When the user executes one of the commands 'no password' or 'no enable
password', a warning message gets shown to inform the user of the
security implications.

While the current implementation works, a warning message gets printed
once for each daemon, which can lead to seeing the same message many
times. This does not affect functionality, but looks like an error to
the user as it can be seen within issue #1432.

This commit only prints the warning message inside lib when vtysh
dispatch is not being used. Additionally, the warning message was copied
into the vtysh command handlers, so that they get printed exactly once.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
lib/command.c
vtysh/vtysh.c