]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
client: do not expose update command when unprivileged
authorVincent Bernat <vincent@bernat.ch>
Thu, 29 Jun 2023 17:49:52 +0000 (19:49 +0200)
committerVincent Bernat <vincent@bernat.ch>
Thu, 29 Jun 2023 17:50:11 +0000 (19:50 +0200)
src/client/lldpcli.c

index c54b6591cfe4550cdfba43b7af8a4d2baf60b239..35147eef66a7b68a1bdfdd048f5dbaeaf814bf26 100644 (file)
@@ -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,