]> git.puffer.fish Git - matthieu/frr.git/commit
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>
Tue, 29 May 2018 18:08:31 +0000 (20:08 +0200)
commit5e73768bfac4baae1b562976eeca91beb34c67f4
treec4a4945a98aa74866f673c665dc4c98688169df9
parent620ef7d7095767f273d02e1807f5f71240ab76fa
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>
(cherry picked from commit eb83f7ce842944518bac726c19eb071257a2ed56)
lib/command.c
vtysh/vtysh.c