aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/ipc.c')
-rw-r--r--sway/commands/ipc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/commands/ipc.c b/sway/commands/ipc.c
index 222be0dd..113a975b 100644
--- a/sway/commands/ipc.c
+++ b/sway/commands/ipc.c
@@ -21,6 +21,11 @@ struct cmd_results *cmd_ipc(int argc, char **argv) {
return cmd_results_new(CMD_FAILURE, "ipc", "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_IPC, NULL, NULL);
}