From: Vincent Bernat Date: Thu, 29 Jun 2023 17:49:52 +0000 (+0200) Subject: client: do not expose update command when unprivileged X-Git-Tag: 1.0.18~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1dde8dacb59d3e81184b470db0159e5d4b02871;p=thirdparty%2Flldpd.git client: do not expose update command when unprivileged --- diff --git a/src/client/lldpcli.c b/src/client/lldpcli.c index c54b6591..35147eef 100644 --- a/src/client/lldpcli.c +++ b/src/client/lldpcli.c @@ -330,12 +330,11 @@ register_commands() root = commands_root(); register_commands_show(root); register_commands_watch(root); - commands_privileged( - commands_new(commands_new(root, "update", - "Update information and send LLDPU on all ports", NULL, - NULL, NULL), - NEWLINE, "Update information and send LLDPU on all ports", NULL, - cmd_update, NULL)); + commands_new(commands_privileged(commands_new(root, "update", + "Update information and send LLDPU on all ports", NULL, NULL, + NULL)), + NEWLINE, "Update information and send LLDPU on all ports", NULL, cmd_update, + NULL); register_commands_configure(root); commands_hidden(commands_new(root, "complete", "Get possible completions from a given command", NULL,