kranewl

A wlroots-based dynamic Wayland compositor, written in C++, configurable with Lua
git clone git://git.deurzen.net/kranewl
Log | Files | Refs | LICENSE

commit 477325b3c93e39cb48e116fe14db6df5484beb18
parent d9c165a5006191cf9d96e2b9363449feeb0438b9
Author: deurzen <max@deurzen.net>
Date:   Thu,  2 Jun 2022 13:59:25 +0200

adds root restoration privilege assertion

Diffstat:
Msrc/kranewl/main.cc | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/kranewl/main.cc b/src/kranewl/main.cc @@ -28,6 +28,11 @@ drop_privileges() return false; } + if (setgid(0) != -1 || setuid(0) != -1) { + spdlog::error("Unable to drop root privileges"); + return false; + } + return true; }