diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-02-22 00:45:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-22 00:45:51 -0500 |
commit | 692768230385d7d63938d7a40e9253c0f028d1cb (patch) | |
tree | 5b8222416cf425c2c2dee123a13dd774fd2a368c /sway/commands/commands.c | |
parent | 46bd2bb5df02bd155bf92af6483c5b553afa7b6e (diff) | |
parent | f68d2fb33c433d13def0921db561eb23d400683c (diff) |
Merge branch 'master' into swaylock_colors
Diffstat (limited to 'sway/commands/commands.c')
-rw-r--r-- | sway/commands/commands.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sway/commands/commands.c b/sway/commands/commands.c index 8c7ed487..0c64970c 100644 --- a/sway/commands/commands.c +++ b/sway/commands/commands.c @@ -10,6 +10,9 @@ struct cmd_results *cmd_commands(int argc, char **argv) { if ((error = checkarg(argc, "commands", EXPECTED_EQUAL_TO, 1))) { return error; } + if ((error = check_security_config())) { + return error; + } if (strcmp(argv[0], "{") != 0) { return cmd_results_new(CMD_FAILURE, "commands", "Expected block declaration"); @@ -19,10 +22,5 @@ struct cmd_results *cmd_commands(int argc, char **argv) { return cmd_results_new(CMD_FAILURE, "commands", "Can only be used in config file."); } - if (!current_config_path || strcmp(SYSCONFDIR "/sway/security", current_config_path) != 0) { - return cmd_results_new(CMD_INVALID, "permit", - "This command is only permitted to run from " SYSCONFDIR "/sway/security"); - } - return cmd_results_new(CMD_BLOCK_COMMANDS, NULL, NULL); } |