distribution/packages/wayland/compositor/sway/patches/sway-100.02-allow-running-as-root.patch

14 lines
447 B
Diff
Raw Normal View History

--- 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");