From: Terry Burton Date: Fri, 7 Feb 2025 14:26:47 +0000 (+0000) Subject: Don't needlessly attempt to set euid to the current euid X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96b18c252360518a67a51cf280236c2135d06aa5;p=thirdparty%2Ffreeradius-server.git Don't needlessly attempt to set euid to the current euid This isn't a noop on Linux and will cause librdkafka to fail. --- diff --git a/src/main/util.c b/src/main/util.c index 607bcaa92c..e39921e312 100644 --- a/src/main/util.c +++ b/src/main/util.c @@ -1534,6 +1534,8 @@ void rad_suid_up(void) fr_exit_now(1); } + if (euid == suid) return; + if (setresuid(-1, suid, -1) < 0) { ERROR("Failed switching to privileged user"); fr_exit_now(1);