aboutsummaryrefslogtreecommitdiffstats
path: root/tests/strrb
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-25 16:34:57 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-25 16:52:42 +0700
commit0a2d9bdfae78c9bfddc8cc838abaddc508f210f1 (patch)
tree11dd91497559a8f7540d4dca7177c95d340f2280 /tests/strrb
parentf36b76211f8bae3f372f7202827a718e125706f1 (diff)
vty/command: fix: restrict the expert mode to the current sessionHEADmaster
Having the expert mode flag stored in the global 'host' structure was a bad idea, because this way it applies globally. In other words, if user Bob activates the expert mode in his dedicated session (e.g. a telnet connection), then not only him, but all other users would see the hidden commands in their VTYs. Moreover, if somebody deactivates the expert mode, it would also affect the Bob's VTY session. And finally, terminating a VTY session would not deactivate the expert mode. Let's move that flag from the global 'struct host' to 'struct vty' representing an individual VTY session, so then the expert mode would only affect the session where it was activated. In functions related to the XML VTY reference generation we don't have access to 'struct vty' (there may be no VTY session at all). Add two additional arguments to vty_dump_nodes(), indicating the global flag mask and a matching mode. This would allow to match the VTY commands in many different ways, e.g. one can dump hidden commands only, or all commands except the library specific ones. Change-Id: Iba13f0949061e3dadf9cf92829d15e97074fe4ad Related: SYS#4910
Diffstat (limited to 'tests/strrb')
0 files changed, 0 insertions, 0 deletions