1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Restricted read-only CLI.

Also adds support for executing commands using birdc <cmd>.
This commit is contained in:
Ondrej Zajicek
2010-02-21 09:57:26 +01:00
parent e304fd4bcf
commit e0a45fb421
8 changed files with 91 additions and 17 deletions

View File

@@ -141,6 +141,9 @@ cmd_reconfig(char *name, int type)
{
struct config *conf;
if (cli_access_restricted())
return;
if (!name)
name = config_name;
cli_msg(-2, "Reading configuration from %s", name);
@@ -303,6 +306,16 @@ cli_init_unix(void)
* Shutdown
*/
void
cmd_shutdown(void)
{
if (cli_access_restricted())
return;
cli_msg(7, "Shutdown requested");
order_shutdown();
}
void
async_shutdown(void)
{