diff options
author | Paul Selkirk <paul@psgd.org> | 2016-07-10 22:45:32 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2016-07-10 22:45:32 -0400 |
commit | 708103998b7005c51fd78fc5563e46dd93fee283 (patch) | |
tree | b0775abe3a1bb4d5d9c7969de92dfcc513b539d9 /projects/hsm/mgmt-cli.h | |
parent | 35b8b35dc6dbf8fff62817a1de3820004af085ae (diff) |
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.
Diffstat (limited to 'projects/hsm/mgmt-cli.h')
-rw-r--r-- | projects/hsm/mgmt-cli.h | 6 |
1 files changed, 6 insertions, 0 deletions
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, |