From f1dde8dacb59d3e81184b470db0159e5d4b02871 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 29 Jun 2023 19:49:52 +0200 Subject: [PATCH] client: do not expose update command when unprivileged --- src/client/lldpcli.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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, -- 2.47.2