From 708103998b7005c51fd78fc5563e46dd93fee283 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Sun, 10 Jul 2016 22:45:32 -0400 Subject: Try to restrict wheel user to only setting pins. This is a bit of social engineering, because at the moment he can easily drop out of config mode to get the full command set. It also doesn't restrict his use of RPC. --- projects/hsm/mgmt-cli.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'projects/hsm/mgmt-cli.h') diff --git a/projects/hsm/mgmt-cli.h b/projects/hsm/mgmt-cli.h index c96dae6..35694aa 100644 --- a/projects/hsm/mgmt-cli.h +++ b/projects/hsm/mgmt-cli.h @@ -67,6 +67,12 @@ _cli_cmd_struct(name, name, cmd_##name, (char *) help); \ cli_register_command2(cli, &cmd_##name##_s, NULL) +#define cli_set_cmd_privilege(name, p) \ + cmd_##name##_s.privilege = p + +#define cli_set_cmd_mode(name, m) \ + cmd_##name##_s.mode = m + typedef enum { DMA_RX_STOP, -- cgit v1.2.3