mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
Add ipc connection feature policy controls
This commit is contained in:
parent
62dad7148f
commit
d353da248b
6 changed files with 34 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue