opnsense-ports/www/squid3/files/patch-src_tools.cc
Franco Fichtner 7e5c3c3ac2 */*: sync with upstream
Taken from: HardenedBSD
2018-07-09 11:51:01 +02:00

11 lines
400 B
C++

--- src/tools.cc.orig 2015-11-01 10:44:25 UTC
+++ src/tools.cc
@@ -635,7 +635,7 @@ no_suid(void)
uid = geteuid();
debugs(21, 3, "no_suid: PID " << getpid() << " giving up root priveleges forever");
- if (setuid(0) < 0)
+ if (setuid(0) < 0 && TheProcessKind != pkHelper)
debugs(50, DBG_IMPORTANT, "WARNING: no_suid: setuid(0): " << xstrerror());
if (setuid(uid) < 0)