aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/jakarta-tomcat4/files/daemonctl.c5
-rw-r--r--www/jakarta-tomcat41/files/daemonctl.c5
-rw-r--r--www/tomcat41/files/daemonctl.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/www/jakarta-tomcat4/files/daemonctl.c b/www/jakarta-tomcat4/files/daemonctl.c
index b33732ae1604..1bc36368241f 100644
--- a/www/jakarta-tomcat4/files/daemonctl.c
+++ b/www/jakarta-tomcat4/files/daemonctl.c
@@ -4,7 +4,7 @@
*
* Daemon control program.
*
- * $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat4/files/Attic/daemonctl.c,v 1.7 2002-08-28 09:22:01 znerd Exp $
+ * $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat4/files/Attic/daemonctl.c,v 1.8 2002-08-28 09:29:59 znerd Exp $
*/
#include <assert.h>
@@ -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();
diff --git a/www/jakarta-tomcat41/files/daemonctl.c b/www/jakarta-tomcat41/files/daemonctl.c
index 2db49a83782b..7ce8126de778 100644
--- a/www/jakarta-tomcat41/files/daemonctl.c
+++ b/www/jakarta-tomcat41/files/daemonctl.c
@@ -4,7 +4,7 @@
*
* Daemon control program.
*
- * $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat41/files/Attic/daemonctl.c,v 1.7 2002-08-28 09:22:01 znerd Exp $
+ * $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat41/files/Attic/daemonctl.c,v 1.8 2002-08-28 09:29:59 znerd Exp $
*/
#include <assert.h>
@@ -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();
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 <assert.h>
@@ -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();