Re: System properties: JVM launch versus catalina.properties

2018-12-29 Thread Martin Grigorov
Hi Igal,

I am not sure this is a good idea.
Usually .properties.default files are used as sample files. And one has to
rename them to .properties to make use of them.
IMO your suggestion will be confusing for people used to this approach.

Regards,
Martin

On Sat, Dec 29, 2018 at 2:11 AM Igal Sapir  wrote:

> Chris,
>
> On 12/28/2018 7:07 AM, Christopher Schultz wrote:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> >
> > All,
> >
> > Someone asked this question on SO recently:
> > https://stackoverflow.com/questions/53921375/tomcat-overriding-catalina-
> > properties-from-commandline/53952396#53952396
> >
> > TLDR: this person wants to set system properties in
> > catalina.properties but be able to "override" those from the command-lin
> > e.
> >
> > The fix would be trivial: just don't clobber the value of any existing
> > system property in CatalinaProperties when copying the properties from
> > the file to the live system properties.
> >
> > I'm wondering if anyone can think of any security issues with doing
> > that. Presumably, if a user can launch Tomcat, they can set system
> > properties. However, it's possible that a user might have the right to
> > *launch* Tomcat, but not reconfigure it (e.g. read-only
> > catalina.properties).
> >
> > That could easily be solved by using a catalina.properties-only
> > setting like "catalina.properties.noclobber.system.properties=true" or
> > something like that.
>
> How about adding an optional file named "catalina.properties.default",
> which will be read before "catalina.properties", and whose values will
> be set only if no corresponding keys are set in System properties?  e.g.
>
> # file catalina.properties.default
> tomcat.port=8080
>
> Can be overridden with `-Dtomcat.properties=`, but
>
> # file catalina.properties
> tomcat.host=localhost
>
> Can not be overridden, as it is now.
>
> Users will know that if they place a value in the default file, it could
> be overridden with a System property.
>
> This should be fairly simple and I can implement it if it sounds like a
> good idea.
>
> Igal
>
>
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


svn commit: r1849902 - in /tomcat/tc7.0.x/trunk: conf/logging.properties webapps/docs/changelog.xml

2018-12-29 Thread huxing
Author: huxing
Date: Sat Dec 29 08:02:00 2018
New Revision: 1849902

URL: http://svn.apache.org/viewvc?rev=1849902=rev
Log:
Correct AsyncFileHandler to FileHandler in logging.properties

Modified:
tomcat/tc7.0.x/trunk/conf/logging.properties
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/conf/logging.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/conf/logging.properties?rev=1849902=1849901=1849902=diff
==
--- tomcat/tc7.0.x/trunk/conf/logging.properties (original)
+++ tomcat/tc7.0.x/trunk/conf/logging.properties Sat Dec 29 08:02:00 2018
@@ -25,22 +25,22 @@ handlers = 1catalina.org.apache.juli.Fil
 1catalina.org.apache.juli.FileHandler.level = FINE
 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
 1catalina.org.apache.juli.FileHandler.prefix = catalina.
-1catalina.org.apache.juli.AsyncFileHandler.encoding = UTF-8
+1catalina.org.apache.juli.FileHandler.encoding = UTF-8
 
 2localhost.org.apache.juli.FileHandler.level = FINE
 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
 2localhost.org.apache.juli.FileHandler.prefix = localhost.
-2localhost.org.apache.juli.AsyncFileHandler.encoding = UTF-8
+2localhost.org.apache.juli.FileHandler.encoding = UTF-8
 
 3manager.org.apache.juli.FileHandler.level = FINE
 3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
 3manager.org.apache.juli.FileHandler.prefix = manager.
-3manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8
+3manager.org.apache.juli.FileHandler.encoding = UTF-8
 
 4host-manager.org.apache.juli.FileHandler.level = FINE
 4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
 4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
-4host-manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8
+4host-manager.org.apache.juli.FileHandler.encoding = UTF-8
 
 java.util.logging.ConsoleHandler.level = FINE
 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1849902=1849901=1849902=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Dec 29 08:02:00 2018
@@ -37,6 +37,7 @@
 Violeta Georgieva
 Jeremy Boynes
 Felix Schumacher
+Huxing Zhang
 Changelog
 
   
@@ -127,6 +128,9 @@
 pick up the latest Windows binaries built with APR 1.6.5 and OpenSSL
 1.1.1a. (markt)
   
+  
+Correct AsyncFileHandler to FileHandler in logging.properties. (huxing)
+  
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org