From a23e6ab5b9cc5770e905d4eaea5d985b2722e744 Mon Sep 17 00:00:00 2001 From: Ernst de Haan Date: Wed, 28 Aug 2002 09:29:59 +0000 Subject: Executing setuid(geteuid()) to fix SUID. At the moment SUID does not work. Submitted by: Ari Suutari See: http://www.geocrawler.com/mail/msg.php3?msg_id=9029840&list=162 --- www/tomcat41/files/daemonctl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'www/tomcat41/files') diff --git a/www/tomcat41/files/daemonctl.c b/www/tomcat41/files/daemonctl.c index 8a230913d263..a1e280b5a715 100644 --- a/www/tomcat41/files/daemonctl.c +++ b/www/tomcat41/files/daemonctl.c @@ -4,7 +4,7 @@ * * Daemon control program. * - * $FreeBSD: /tmp/pcvs/ports/www/tomcat41/files/Attic/daemonctl.c,v 1.7 2002-08-28 09:22:01 znerd Exp $ + * $FreeBSD: /tmp/pcvs/ports/www/tomcat41/files/Attic/daemonctl.c,v 1.8 2002-08-28 09:29:59 znerd Exp $ */ #include @@ -78,6 +78,9 @@ int main(int argc, char *argv[]) { return 0; } + /* Set the UID to the effective UID to fix SUID */ + setuid(geteuid()); + argument = argv[1]; if (strcmp("start", argument) == 0) { start(); -- cgit v1.2.3