diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/config.h | 8 | ||||
-rw-r--r-- | include/sway/security.h | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index febde63d..c3a916b1 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -203,7 +203,6 @@ enum secure_feature { FEATURE_FULLSCREEN = 16, FEATURE_KEYBOARD = 32, FEATURE_MOUSE = 64, - FEATURE_IPC = 128, }; struct feature_policy { @@ -228,6 +227,11 @@ enum ipc_feature { IPC_FEATURE_EVENT_INPUT = 8192 }; +struct ipc_policy { + char *program; + uint32_t features; +}; + /** * The configuration struct. The result of loading a config file. */ @@ -300,7 +304,7 @@ struct sway_config { // Security list_t *command_policies; list_t *feature_policies; - uint32_t ipc_policy; + list_t *ipc_policies; }; void pid_workspace_add(struct pid_workspace *pw); diff --git a/include/sway/security.h b/include/sway/security.h index 1cc85bee..c3a5cfd4 100644 --- a/include/sway/security.h +++ b/include/sway/security.h @@ -3,12 +3,14 @@ #include <unistd.h> #include "sway/config.h" -enum secure_feature get_feature_policy(pid_t pid); -enum command_context get_command_policy(const char *cmd); +uint32_t get_feature_policy(pid_t pid); +uint32_t get_ipc_policy(pid_t pid); +uint32_t get_command_policy(const char *cmd); const char *command_policy_str(enum command_context context); struct feature_policy *alloc_feature_policy(const char *program); +struct ipc_policy *alloc_ipc_policy(const char *program); struct command_policy *alloc_command_policy(const char *command); #endif |