ports/144878: tomcat55 uid is hardcoded to 80
Jason Helfman
jhelfman at e-e.com
Fri Mar 19 19:00:09 UTC 2010
>Number: 144878
>Category: ports
>Synopsis: tomcat55 uid is hardcoded to 80
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 19 19:00:08 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Jason Helfman
>Release: 7.2-p7
>Organization:
Experts Exchange
>Environment:
FreeBSD eggman.experts-exchange.com 7.2-RELEASE-p7 FreeBSD 7.2-RELEASE-p7 #0: Fri Feb 26 19:51:57 UTC 2010 root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
The user and group for tomcat are configurable, however the id has to be 80. This didn't make sense to me, so I put a configurable option in for the id as well.
>How-To-Repeat:
>Fix:
patch included
Patch attached with submission follows:
--- tomcat55/Makefile.orig 2010-03-19 11:32:45.000000000 -0700
+++ tomcat55/Makefile 2010-03-19 11:41:38.000000000 -0700
@@ -29,6 +29,7 @@
APP_SHORTNAME= tomcat${MAJOR_VER:S/.//}
TOMCAT_USER?= www
TOMCAT_GROUP?= www
+TOMCAT_UID?= 80
HTTP_PORT?= 8180
SHUTDOWN_PORT?= 8005
AJP_1_3_PORT?= 8009
@@ -58,7 +59,8 @@
STDOUT_LOG=${STDOUT_LOG} \
TOMCAT_HOME=${APP_HOME} \
TOMCAT_VERSION=${MAJOR_VER:S/.//} \
- USER=${TOMCAT_USER}
+ USER=${TOMCAT_USER} \
+ UID=${TOMCAT_UID}
.include <bsd.port.pre.mk>
@@ -74,7 +76,7 @@
@${ECHO_MSG} " Destination directory: ${APP_HOME}"
@${ECHO_MSG} " Location of JDK: ${JAVA_HOME}"
@${ECHO_MSG} " Location of Java port: ${JAVA_PORT}"
- @${ECHO_MSG} " Running as (user/group): ${TOMCAT_USER}/${TOMCAT_GROUP}"
+ @${ECHO_MSG} " Running as (user/group/uid): ${TOMCAT_USER}/${TOMCAT_GROUP}/${TOMCAT_UID}"
@${ECHO_MSG} " HTTP port: ${HTTP_PORT}"
@${ECHO_MSG} " Shutdown listener port: ${SHUTDOWN_PORT}"
@${ECHO_MSG} " AJP 1.3 connector port: ${AJP_1_3_PORT}"
--- tomcat55/files/pkg-install.in.orig 2010-03-19 11:32:09.000000000 -0700
+++ tomcat55/files/pkg-install.in 2010-03-19 11:32:34.000000000 -0700
@@ -12,7 +12,7 @@
fi
# Set some constants
-UID=80
+UID=%%UID%%
GID=${UID}
USER=%%USER%%
GROUP=%%GROUP%%
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list