mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
Security v2
This commit is contained in:
parent
7ca9ef12f8
commit
4f4b335737
8 changed files with 315 additions and 4 deletions
|
|
@ -302,4 +302,6 @@ sway_cmd cmd_ipc_cmd;
|
|||
sway_cmd cmd_ipc_events;
|
||||
sway_cmd cmd_ipc_event_cmd;
|
||||
|
||||
sway_cmd cmd_security;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
24
include/sway/security.h
Normal file
24
include/sway/security.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
enum security_perm {
|
||||
PRIV_LAYER_SHELL,
|
||||
PRIV_OUTPUT_MANAGER,
|
||||
PRIV_INPUT_METHOD,
|
||||
PRIV_TEXT_INPUT,
|
||||
PRIV_FOREIGN_TOPLEVEL_MANAGER,
|
||||
PRIV_DMABUF_MANAGER,
|
||||
PRIV_SCREENCOPY_MANAGER,
|
||||
PRIV_DATA_CONTROL_MANAGER,
|
||||
PRIV_GAMMA_CONTROL_MANAGER,
|
||||
PRIV_INPUT_INHIBIT,
|
||||
PRIV_INPUT_KEYBOARD_SHORTCUTS_INHIBIT,
|
||||
PRIV_INPUT_VIRTUAL_KEYBOARD,
|
||||
PRIV_INPUT_VIRTUAL_POINTER,
|
||||
PRIV_OUTPUT_POWER_MANAGER,
|
||||
PRIV_LAST, /* not an actual permission */
|
||||
};
|
||||
|
||||
bool security_global_filter(const struct wl_client *client, const struct wl_global *global, void *data);
|
||||
|
||||
void security_set_permit(struct wl_client *client, uint32_t allowed);
|
||||
uint32_t security_get_permit(const struct wl_client *client);
|
||||
|
|
@ -37,6 +37,7 @@ struct sway_server {
|
|||
struct wl_listener compositor_new_surface;
|
||||
|
||||
struct wlr_data_device_manager *data_device_manager;
|
||||
struct wlr_gamma_control_manager_v1 *gamma_control_manager;
|
||||
|
||||
struct sway_input_manager *input;
|
||||
|
||||
|
|
@ -85,6 +86,10 @@ struct sway_server {
|
|||
struct wlr_text_input_manager_v3 *text_input;
|
||||
struct wlr_foreign_toplevel_manager_v1 *foreign_toplevel_manager;
|
||||
|
||||
struct wlr_export_dmabuf_manager_v1 *dmabuf_manager;
|
||||
struct wlr_screencopy_manager_v1 *screencopy_manager;
|
||||
struct wlr_data_control_manager_v1 *data_control_manager;
|
||||
|
||||
size_t txn_timeout_ms;
|
||||
list_t *transactions;
|
||||
list_t *dirty_nodes;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue