diff options
author | 2016-12-02 08:10:03 -0500 | |
---|---|---|
committer | 2016-12-02 08:10:03 -0500 | |
commit | f23880b1fdd70a21b04317c18208a1f3ce356839 (patch) | |
tree | 51a54d43531ac28ef014193abef8f4ccd7a78332 /include/sway | |
parent | Enforce mouse permissions (diff) | |
download | sway-f23880b1fdd70a21b04317c18208a1f3ce356839.tar.gz sway-f23880b1fdd70a21b04317c18208a1f3ce356839.tar.zst sway-f23880b1fdd70a21b04317c18208a1f3ce356839.zip |
Add support for command policies in config file
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/commands.h | 10 | ||||
-rw-r--r-- | include/sway/security.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index 1d5d56ac..ccc3cf58 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -18,7 +18,10 @@ enum cmd_status { | |||
18 | CMD_BLOCK_MODE, | 18 | CMD_BLOCK_MODE, |
19 | CMD_BLOCK_BAR, | 19 | CMD_BLOCK_BAR, |
20 | CMD_BLOCK_BAR_COLORS, | 20 | CMD_BLOCK_BAR_COLORS, |
21 | CMD_BLOCK_INPUT | 21 | CMD_BLOCK_INPUT, |
22 | CMD_BLOCK_COMMANDS, | ||
23 | CMD_BLOCK_IPC, | ||
24 | CMD_BLOCK_IPC_EVENTS, | ||
22 | }; | 25 | }; |
23 | 26 | ||
24 | /** | 27 | /** |
@@ -58,6 +61,10 @@ struct cmd_results *handle_command(char *command); | |||
58 | * Do not use this under normal conditions. | 61 | * Do not use this under normal conditions. |
59 | */ | 62 | */ |
60 | struct cmd_results *config_command(char *command, enum cmd_status block); | 63 | struct cmd_results *config_command(char *command, enum cmd_status block); |
64 | /* | ||
65 | * Parses a command policy rule. | ||
66 | */ | ||
67 | struct cmd_results *config_commands_command(char *exec); | ||
61 | 68 | ||
62 | /** | 69 | /** |
63 | * Allocates a cmd_results object. | 70 | * Allocates a cmd_results object. |
@@ -93,6 +100,7 @@ sway_cmd cmd_client_unfocused; | |||
93 | sway_cmd cmd_client_urgent; | 100 | sway_cmd cmd_client_urgent; |
94 | sway_cmd cmd_client_placeholder; | 101 | sway_cmd cmd_client_placeholder; |
95 | sway_cmd cmd_client_background; | 102 | sway_cmd cmd_client_background; |
103 | sway_cmd cmd_commands; | ||
96 | sway_cmd cmd_debuglog; | 104 | sway_cmd cmd_debuglog; |
97 | sway_cmd cmd_exec; | 105 | sway_cmd cmd_exec; |
98 | sway_cmd cmd_exec_always; | 106 | sway_cmd cmd_exec_always; |
diff --git a/include/sway/security.h b/include/sway/security.h index ae2de0d8..aa51fd81 100644 --- a/include/sway/security.h +++ b/include/sway/security.h | |||
@@ -7,5 +7,6 @@ enum secure_feature get_feature_policy(pid_t pid); | |||
7 | enum command_context get_command_policy(const char *cmd); | 7 | enum command_context get_command_policy(const char *cmd); |
8 | 8 | ||
9 | struct feature_policy *alloc_feature_policy(const char *program); | 9 | struct feature_policy *alloc_feature_policy(const char *program); |
10 | struct command_policy *alloc_command_policy(const char *command); | ||
10 | 11 | ||
11 | #endif | 12 | #endif |