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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user