]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't needlessly attempt to set euid to the current euid
authorTerry Burton <tez@terryburton.co.uk>
Fri, 7 Feb 2025 14:26:47 +0000 (14:26 +0000)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Tue, 18 Feb 2025 10:41:21 +0000 (10:41 +0000)
This isn't a noop on Linux and will cause librdkafka to fail.

src/main/util.c

index 607bcaa92cd39c90380b81ec09cb0c67cc3bebf1..e39921e3127d67367179b308a975fb763a7ed0cf 100644 (file)
@@ -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);