aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/ipc.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-02-20 07:42:08 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-02-20 07:51:31 -0500
commit126ce571dab09d84d8ee1b760981dbba7cbc1000 (patch)
treec13e957c752e3ae0798945e2e0be2af99da7dc68 /sway/commands/ipc.c
parentAdd * policies and fix bug (diff)
downloadsway-126ce571dab09d84d8ee1b760981dbba7cbc1000.tar.gz
sway-126ce571dab09d84d8ee1b760981dbba7cbc1000.tar.zst
sway-126ce571dab09d84d8ee1b760981dbba7cbc1000.zip
Read configs from /etc/sway/security.d/*
Diffstat (limited to 'sway/commands/ipc.c')
-rw-r--r--sway/commands/ipc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sway/commands/ipc.c b/sway/commands/ipc.c
index d49aab64..8a7b849f 100644
--- a/sway/commands/ipc.c
+++ b/sway/commands/ipc.c
@@ -14,6 +14,9 @@ struct cmd_results *cmd_ipc(int argc, char **argv) {
14 if ((error = checkarg(argc, "ipc", EXPECTED_EQUAL_TO, 2))) { 14 if ((error = checkarg(argc, "ipc", EXPECTED_EQUAL_TO, 2))) {
15 return error; 15 return error;
16 } 16 }
17 if ((error = check_security_config())) {
18 return error;
19 }
17 20
18 const char *program = argv[0]; 21 const char *program = argv[0];
19 22
@@ -26,11 +29,6 @@ struct cmd_results *cmd_ipc(int argc, char **argv) {
26 return cmd_results_new(CMD_FAILURE, "ipc", "Can only be used in config file."); 29 return cmd_results_new(CMD_FAILURE, "ipc", "Can only be used in config file.");
27 } 30 }
28 31
29 if (!current_config_path || strcmp(SYSCONFDIR "/sway/security", current_config_path) != 0) {
30 return cmd_results_new(CMD_INVALID, "permit",
31 "This command is only permitted to run from " SYSCONFDIR "/sway/security");
32 }
33
34 current_policy = alloc_ipc_policy(program); 32 current_policy = alloc_ipc_policy(program);
35 list_add(config->ipc_policies, current_policy); 33 list_add(config->ipc_policies, current_policy);
36 34