summaryrefslogtreecommitdiffstats
path: root/sway/commands/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/commands.c')
-rw-r--r--sway/commands/commands.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/commands/commands.c b/sway/commands/commands.c
index 5d248e30..8c7ed487 100644
--- a/sway/commands/commands.c
+++ b/sway/commands/commands.c
@@ -19,5 +19,10 @@ struct cmd_results *cmd_commands(int argc, char **argv) {
19 return cmd_results_new(CMD_FAILURE, "commands", "Can only be used in config file."); 19 return cmd_results_new(CMD_FAILURE, "commands", "Can only be used in config file.");
20 } 20 }
21 21
22 if (!current_config_path || strcmp(SYSCONFDIR "/sway/security", current_config_path) != 0) {
23 return cmd_results_new(CMD_INVALID, "permit",
24 "This command is only permitted to run from " SYSCONFDIR "/sway/security");
25 }
26
22 return cmd_results_new(CMD_BLOCK_COMMANDS, NULL, NULL); 27 return cmd_results_new(CMD_BLOCK_COMMANDS, NULL, NULL);
23} 28}