diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-21 09:57:26 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-21 09:57:26 +0100 |
commit | e0a45fb42163a6bfdeeee44bd0a6a7461552e10f (patch) | |
tree | d0c889a0b98ea7d269e44c1693d5a3fbb6322738 /nest/proto.c | |
parent | e304fd4bcf5813b581a39078a25a5cf6916b9f29 (diff) |
Restricted read-only CLI.
Also adds support for executing commands using birdc <cmd>.
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nest/proto.c b/nest/proto.c index 7c4d32d0..e9cf3dfa 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -1006,8 +1006,12 @@ proto_apply_cmd_patt(char *patt, void (* cmd)(struct proto *, unsigned int, int) } void -proto_apply_cmd(struct proto_spec ps, void (* cmd)(struct proto *, unsigned int, int), unsigned int arg) +proto_apply_cmd(struct proto_spec ps, void (* cmd)(struct proto *, unsigned int, int), + int restricted, unsigned int arg) { + if (restricted && cli_access_restricted()) + return; + if (ps.patt) proto_apply_cmd_patt(ps.ptr, cmd, arg); else |