board/common: deprecate existing show command

There's several reasons for this. The main reason is that it was
developed as an intermediate way of getting system information when
the operational datastore was almost empty. There's not a lot of data
available in the operational datastore and we shall rely on that data
primarily. This command isn't safe to run from a jailed CLI as i
doesn't validate input and run commands directly in the shell, making
it hard to protect against a CLI jail break.

In upcoming patches we will introduce a new show tool that relies
solely on operational data and which sanitize the user input.

Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
Richard Alpe
2025-04-07 09:06:25 +02:00
parent bc5dd949d7
commit 827dc098e4
2 changed files with 9 additions and 9 deletions
+9 -9
View File
@@ -349,17 +349,17 @@
</PARAM>
<ACTION sym="script" in="tty" out="tty" interrupt="true">
if [ -z "$KLISH_PARAM_name" ]; then
doas vtysh -c "show ip ospf" |pager
doas vtysh -c "show-legacy ip ospf" |pager
elif [ "$KLISH_PARAM_name" == "neighbor" ];then
doas vtysh -c "show ip ospf neighbor" |pager
doas vtysh -c "show-legacy ip ospf neighbor" |pager
elif [ "$KLISH_PARAM_name" == "interfaces" ];then
doas vtysh -c "show ip ospf interface" |pager
doas vtysh -c "show-legacy ip ospf interface" |pager
elif [ "$KLISH_PARAM_name" == "routes" ];then
doas vtysh -c "show ip ospf route" |pager
doas vtysh -c "show-legacy ip ospf route" |pager
elif [ "$KLISH_PARAM_name" == "database" ];then
doas vtysh -c "show ip ospf database" |pager
doas vtysh -c "show-legacy ip ospf database" |pager
elif [ "$KLISH_PARAM_name" == "bfd" ];then
doas vtysh -c "show bfd peers" |pager
doas vtysh -c "show-legacy bfd peers" |pager
fi
</ACTION>
</COMMAND>
@@ -380,7 +380,7 @@
KLISH_PARAM_ip=ipv6
;;
esac
show -p $KLISH_PARAM_ip route |pager
show-legacy -p $KLISH_PARAM_ip route |pager
</ACTION>
</COMMAND>
@@ -437,7 +437,7 @@
<COMMAND name="route" help="Show IPv4 routing table" mode="switch">
<ACTION sym="script" in="tty" out="tty" interrupt="true">
show -p ip route |pager
show-legacy -p ip route |pager
</ACTION>
</COMMAND>
</SWITCH>
@@ -451,7 +451,7 @@
<SWITCH name="optional" min="0">
<COMMAND name="route" help="Show IPv6 routing table" mode="switch">
<ACTION sym="script" in="tty" out="tty" interrupt="true">
show -p ipv6 route |pager
show-legacy -p ipv6 route |pager
</ACTION>
</COMMAND>
</SWITCH>