aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/main.c b/sway/main.c
index a7e808ad..a325dc3a 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -359,6 +359,11 @@ int main(int argc, char **argv) {
359 359
360 executable_sanity_check(); 360 executable_sanity_check();
361 bool suid = false; 361 bool suid = false;
362
363 if (!server_privileged_prepare(&server)) {
364 return 1;
365 }
366
362#ifdef __linux__ 367#ifdef __linux__
363 if (getuid() != geteuid() || getgid() != getegid()) { 368 if (getuid() != geteuid() || getgid() != getegid()) {
364 // Retain capabilities after setuid() 369 // Retain capabilities after setuid()