aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorÉrico Rolim <erico.erc@gmail.com>2020-05-21 00:46:28 -0300
committerSimon Ser <contact@emersion.fr>2020-05-21 10:57:00 +0200
commit1d3681f5213535c1f47ed8bd0cddb7df775dd75e (patch)
treeb9fce1efbd9b479832b0f1d3210602ec77e876b5 /sway/commands.c
parent06fc42359bf155f81b559637e468b29266104d8f (diff)
Remove code related to the security features
- Remove struct definitions - Remove struct members - Remove initializations and frees
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/sway/commands.c b/sway/commands.c
index afe05b26..f20a8baa 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -9,7 +9,6 @@
#include "sway/commands.h"
#include "sway/config.h"
#include "sway/criteria.h"
-#include "sway/security.h"
#include "sway/input/input-manager.h"
#include "sway/input/seat.h"
#include "sway/tree/view.h"
@@ -489,28 +488,6 @@ struct cmd_results *config_commands_command(char *exec) {
context |= context_names[j].context;
}
- struct command_policy *policy = NULL;
- for (int i = 0; i < config->command_policies->length; ++i) {
- struct command_policy *p = config->command_policies->items[i];
- if (strcmp(p->command, cmd) == 0) {
- policy = p;
- break;
- }
- }
- if (!policy) {
- policy = alloc_command_policy(cmd);
- if (!sway_assert(policy, "Unable to allocate security policy")) {
- results = cmd_results_new(CMD_INVALID,
- "Unable to allocate memory");
- goto cleanup;
- }
- list_add(config->command_policies, policy);
- }
- policy->context = context;
-
- sway_log(SWAY_INFO, "Set command policy for %s to %d",
- policy->command, policy->context);
-
results = cmd_results_new(CMD_SUCCESS, NULL);
cleanup: