aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-12-02 18:08:15 -0500
committerDrew DeVault <sir@cmpwn.com>2016-12-02 18:09:19 -0500
commitd353da248b4653d7bc027ff0dceca946cdd0b22f (patch)
treeb76f5d9b8164a9eb102eee6b6cb13c5b9f6cbc75 /sway/commands
parent62dad7148f7b7b314f0297e191861ae3f03e9e1f (diff)
Add ipc connection feature policy controls
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/permit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/permit.c b/sway/commands/permit.c
index 258ea5b2..7a25e4ce 100644
--- a/sway/commands/permit.c
+++ b/sway/commands/permit.c
@@ -19,17 +19,17 @@ static enum secure_feature get_features(int argc, char **argv,
{ "fullscreen", FEATURE_FULLSCREEN },
{ "keyboard", FEATURE_KEYBOARD },
{ "mouse", FEATURE_MOUSE },
+ { "ipc", FEATURE_IPC },
};
- size_t names_len = 7;
for (int i = 1; i < argc; ++i) {
size_t j;
- for (j = 0; j < names_len; ++j) {
+ for (j = 0; j < sizeof(feature_names) / sizeof(feature_names[0]); ++j) {
if (strcmp(feature_names[j].name, argv[i]) == 0) {
break;
}
}
- if (j == names_len) {
+ if (j == sizeof(feature_names) / sizeof(feature_names[0])) {
*error = cmd_results_new(CMD_INVALID,
"permit", "Invalid feature grant %s", argv[i]);
return 0;