From 6029604bc24d5fa55d2634f77083c10c0702ac2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20K=C3=BCthe?= Date: Tue, 9 Sep 2025 05:56:12 +0000 Subject: [PATCH] Remove root check at startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Background: A process, especially a long-running process that has contact with the outside world, should not have to start with privileged access. With the help of the capabilities system, it is possible to assign individual required permissions to the process and thus also dispense with root privileges (example `CapabilityBoundingSet/AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW` in systemd). Signed-off-by: Marek Küthe --- src/main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main.c b/src/main.c index 920c479..9b4d4f9 100644 --- a/src/main.c +++ b/src/main.c @@ -265,9 +265,6 @@ main(argc, argv) if (optind < argc) return usage(1); - if (geteuid() != 0) - errx(1, "Need root privileges to start."); - log_fp = stderr; setlinebuf(stderr);