mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Perform (partial) server initialization before dropping privileges.
Some operations during backend creation (e.g. becoming DRM master) require CAP_SYS_ADMIN privileges. At this point, sway has dropped them already, though. This patch splits the privileged part of server_init into its own function and calls it before dropping its privileges. This fixes the bug with minimal security implications.
This commit is contained in:
parent
202ee51150
commit
a5c091e302
3 changed files with 15 additions and 3 deletions
|
|
@ -47,6 +47,8 @@ struct sway_server {
|
|||
|
||||
struct sway_server server;
|
||||
|
||||
/* Prepares an unprivileged server_init by performing all privileged operations in advance */
|
||||
bool server_privileged_prepare(struct sway_server *server);
|
||||
bool server_init(struct sway_server *server);
|
||||
void server_fini(struct sway_server *server);
|
||||
void server_run(struct sway_server *server);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue