distribution/packages/wayland/compositor/sway/patches/sway-100.02-allow-running-as-root.patch
2022-07-11 06:58:58 -04:00

13 lines
447 B
Diff

--- a/sway/main.c
+++ b/sway/main.c
@@ -152,6 +152,10 @@ static void log_kernel(void) {
static bool drop_permissions(void) {
+ if (getuid() == 0 || getgid() == 0) {
+ sway_log(SWAY_INFO, "Running sway as root user");
+ return true;
+ }
if (getuid() != geteuid() || getgid() != getegid()) {
sway_log(SWAY_ERROR, "!!! DEPRECATION WARNING: "
"SUID privilege drop will be removed in a future release, please migrate to seatd-launch");