aboutsummaryrefslogtreecommitdiffstats
path: root/sway/security.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-12-01 21:51:07 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-12-01 21:51:07 -0500
commit21e1b2bef3d3cda3d10d4dc2aafe5fcac583c2a5 (patch)
tree40a28228200d8199680c9d52ebe7a90ad0ab7997 /sway/security.c
parentImplement permit and reject commands (diff)
downloadsway-21e1b2bef3d3cda3d10d4dc2aafe5fcac583c2a5.tar.gz
sway-21e1b2bef3d3cda3d10d4dc2aafe5fcac583c2a5.tar.zst
sway-21e1b2bef3d3cda3d10d4dc2aafe5fcac583c2a5.zip
Add security checks for background, panel, lock
Diffstat (limited to 'sway/security.c')
-rw-r--r--sway/security.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/security.c b/sway/security.c
index 776bd527..a4cecf16 100644
--- a/sway/security.c
+++ b/sway/security.c
@@ -34,7 +34,7 @@ enum secure_feature get_feature_policy(pid_t pid) {
34 34
35 for (int i = 0; i < config->feature_policies->length; ++i) { 35 for (int i = 0; i < config->feature_policies->length; ++i) {
36 struct feature_policy *policy = config->feature_policies->items[i]; 36 struct feature_policy *policy = config->feature_policies->items[i];
37 if (strcmp(policy->program, "*")) { 37 if (strcmp(policy->program, "*") == 0) {
38 default_policy = policy->features; 38 default_policy = policy->features;
39 } 39 }
40 if (strcmp(policy->program, link) == 0) { 40 if (strcmp(policy->program, link) == 0) {
@@ -50,7 +50,7 @@ enum command_context get_command_policy(const char *cmd) {
50 50
51 for (int i = 0; i < config->command_policies->length; ++i) { 51 for (int i = 0; i < config->command_policies->length; ++i) {
52 struct command_policy *policy = config->command_policies->items[i]; 52 struct command_policy *policy = config->command_policies->items[i];
53 if (strcmp(policy->command, "*")) { 53 if (strcmp(policy->command, "*") == 0) {
54 default_policy = policy->context; 54 default_policy = policy->context;
55 } 55 }
56 if (strcmp(policy->command, cmd) == 0) { 56 if (strcmp(policy->command, cmd) == 0) {