This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new ab83a2e BZ 64270. Use documented default umask of 0027 with jsvc and daemon.sh. ab83a2e is described below commit ab83a2e6aff00df1c1be3ab88fa4e1ef5189727a Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Mar 30 15:49:24 2020 +0100 BZ 64270. Use documented default umask of 0027 with jsvc and daemon.sh. https://bz.apache.org/bugzilla/show_bug.cgi?id=64270 Also Make umask configurable. --- bin/daemon.sh | 9 ++++++++- webapps/docs/changelog.xml | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/daemon.sh b/bin/daemon.sh index b5aa0c9..a44a1ed 100755 --- a/bin/daemon.sh +++ b/bin/daemon.sh @@ -90,7 +90,6 @@ test ".$MAX_FD" = . && MAX_FD="maximum" # test ".$TOMCAT_USER" = . && TOMCAT_USER=tomcat # Set JAVA_HOME to working JDK or JRE -# JAVA_HOME=/opt/jdk-1.6.0.22 # If not set we'll try to guess the JAVA_HOME # from java binary if on the PATH # @@ -183,6 +182,12 @@ if [ "$cygwin" = "false" ]; then fi fi +# Set UMASK unless it has been overridden +if [ -z "$UMASK" ]; then + UMASK="0027" +fi +umask $UMASK + # Java 9 no longer supports the java.endorsed.dirs # system property. Only try to use it if # JAVA_ENDORSED_DIRS was explicitly set @@ -204,6 +209,7 @@ case "$1" in -java-home "\"$JAVA_HOME\"" \ -pidfile "\"$CATALINA_PID\"" \ -wait $SERVICE_START_WAIT_TIME \ + -umask $UMASK \ -nodetach \ -outfile "\"&1\"" \ -errfile "\"&2\"" \ @@ -223,6 +229,7 @@ case "$1" in -user $TOMCAT_USER \ -pidfile "\"$CATALINA_PID\"" \ -wait $SERVICE_START_WAIT_TIME \ + -umask $UMASK \ -outfile "\"$CATALINA_OUT\"" \ -errfile "\"&1\"" \ -classpath "\"$CLASSPATH\"" \ diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index fda7893..495bcba 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -167,6 +167,12 @@ Expand the coverage of the Chinese translations provided with Apache Tomcat. Contribution provided by Lee Yazhou. (markt) </add> + <fix> + <bug>64270</bug>: Set the documented default umask of <code>0027</code> + when using jsvc via <code>daemon.sh</code> and allow the umask used to + be configured via the <code>UMASK</code> environment variable as it is + when using <code>catalina.sh</code>. (markt) + </fix> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org