diff options
author | Érico Rolim <erico.erc@gmail.com> | 2020-05-21 00:46:28 -0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-21 10:57:00 +0200 |
commit | 1d3681f5213535c1f47ed8bd0cddb7df775dd75e (patch) | |
tree | b9fce1efbd9b479832b0f1d3210602ec77e876b5 /include | |
parent | Fix typos in comments (diff) | |
download | sway-1d3681f5213535c1f47ed8bd0cddb7df775dd75e.tar.gz sway-1d3681f5213535c1f47ed8bd0cddb7df775dd75e.tar.zst sway-1d3681f5213535c1f47ed8bd0cddb7df775dd75e.zip |
Remove code related to the security features
- Remove struct definitions
- Remove struct members
- Remove initializations and frees
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/config.h | 60 | ||||
-rw-r--r-- | include/sway/security.h | 18 |
2 files changed, 0 insertions, 78 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index 85605ce4..b3fd6668 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -401,61 +401,6 @@ enum command_context { | |||
401 | CONTEXT_ALL = 0xFFFFFFFF, | 401 | CONTEXT_ALL = 0xFFFFFFFF, |
402 | }; | 402 | }; |
403 | 403 | ||
404 | struct command_policy { | ||
405 | char *command; | ||
406 | uint32_t context; | ||
407 | }; | ||
408 | |||
409 | enum secure_feature { | ||
410 | FEATURE_LOCK = 1 << 0, | ||
411 | FEATURE_PANEL = 1 << 1, | ||
412 | FEATURE_BACKGROUND = 1 << 2, | ||
413 | FEATURE_SCREENSHOT = 1 << 3, | ||
414 | FEATURE_FULLSCREEN = 1 << 4, | ||
415 | FEATURE_KEYBOARD = 1 << 5, | ||
416 | FEATURE_MOUSE = 1 << 6, | ||
417 | }; | ||
418 | |||
419 | struct feature_policy { | ||
420 | char *program; | ||
421 | uint32_t features; | ||
422 | }; | ||
423 | |||
424 | enum ipc_feature { | ||
425 | IPC_FEATURE_COMMAND = 1 << 0, | ||
426 | IPC_FEATURE_GET_WORKSPACES = 1 << 1, | ||
427 | IPC_FEATURE_GET_OUTPUTS = 1 << 2, | ||
428 | IPC_FEATURE_GET_TREE = 1 << 3, | ||
429 | IPC_FEATURE_GET_MARKS = 1 << 4, | ||
430 | IPC_FEATURE_GET_BAR_CONFIG = 1 << 5, | ||
431 | IPC_FEATURE_GET_VERSION = 1 << 6, | ||
432 | IPC_FEATURE_GET_INPUTS = 1 << 7, | ||
433 | IPC_FEATURE_EVENT_WORKSPACE = 1 << 8, | ||
434 | IPC_FEATURE_EVENT_OUTPUT = 1 << 9, | ||
435 | IPC_FEATURE_EVENT_MODE = 1 << 10, | ||
436 | IPC_FEATURE_EVENT_WINDOW = 1 << 11, | ||
437 | IPC_FEATURE_EVENT_BINDING = 1 << 12, | ||
438 | IPC_FEATURE_EVENT_INPUT = 1 << 13, | ||
439 | IPC_FEATURE_GET_SEATS = 1 << 14, | ||
440 | |||
441 | IPC_FEATURE_ALL_COMMANDS = IPC_FEATURE_COMMAND | | ||
442 | IPC_FEATURE_GET_WORKSPACES | IPC_FEATURE_GET_OUTPUTS | | ||
443 | IPC_FEATURE_GET_TREE | IPC_FEATURE_GET_MARKS | | ||
444 | IPC_FEATURE_GET_BAR_CONFIG | IPC_FEATURE_GET_VERSION | | ||
445 | IPC_FEATURE_GET_INPUTS | IPC_FEATURE_GET_SEATS, | ||
446 | IPC_FEATURE_ALL_EVENTS = IPC_FEATURE_EVENT_WORKSPACE | | ||
447 | IPC_FEATURE_EVENT_OUTPUT | IPC_FEATURE_EVENT_MODE | | ||
448 | IPC_FEATURE_EVENT_WINDOW | IPC_FEATURE_EVENT_BINDING | | ||
449 | IPC_FEATURE_EVENT_INPUT, | ||
450 | |||
451 | IPC_FEATURE_ALL = IPC_FEATURE_ALL_COMMANDS | IPC_FEATURE_ALL_EVENTS, | ||
452 | }; | ||
453 | |||
454 | struct ipc_policy { | ||
455 | char *program; | ||
456 | uint32_t features; | ||
457 | }; | ||
458 | |||
459 | enum focus_follows_mouse_mode { | 404 | enum focus_follows_mouse_mode { |
460 | FOLLOWS_NO, | 405 | FOLLOWS_NO, |
461 | FOLLOWS_YES, | 406 | FOLLOWS_YES, |
@@ -584,11 +529,6 @@ struct sway_config { | |||
584 | int32_t floating_minimum_width; | 529 | int32_t floating_minimum_width; |
585 | int32_t floating_minimum_height; | 530 | int32_t floating_minimum_height; |
586 | 531 | ||
587 | // Security | ||
588 | list_t *command_policies; | ||
589 | list_t *feature_policies; | ||
590 | list_t *ipc_policies; | ||
591 | |||
592 | // The keysym to keycode translation | 532 | // The keysym to keycode translation |
593 | struct xkb_state *keysym_translation_state; | 533 | struct xkb_state *keysym_translation_state; |
594 | 534 | ||
diff --git a/include/sway/security.h b/include/sway/security.h deleted file mode 100644 index 0edffdfa..00000000 --- a/include/sway/security.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef _SWAY_SECURITY_H | ||
2 | #define _SWAY_SECURITY_H | ||
3 | #include <unistd.h> | ||
4 | #include "sway/config.h" | ||
5 | |||
6 | uint32_t get_feature_policy_mask(pid_t pid); | ||
7 | uint32_t get_ipc_policy_mask(pid_t pid); | ||
8 | uint32_t get_command_policy_mask(const char *cmd); | ||
9 | |||
10 | struct feature_policy *get_feature_policy(const char *name); | ||
11 | |||
12 | const char *command_policy_str(enum command_context context); | ||
13 | |||
14 | struct feature_policy *alloc_feature_policy(const char *program); | ||
15 | struct ipc_policy *alloc_ipc_policy(const char *program); | ||
16 | struct command_policy *alloc_command_policy(const char *command); | ||
17 | |||
18 | #endif | ||