Re: [VOTE] Release build 6.0.17

2008-07-15 Thread Mark Thomas

Jim Jagielski wrote:


On Jul 13, 2008, at 6:19 PM, Mark Thomas wrote:


Remy Maucherat wrote:

The candidates binaries are available here:
http://people.apache.org/~remm/tomcat-6/v6.0.17/
According to the release process, the 6.0.17 tag is:
[ ] Broken
[ ] Alpha
[X] Beta
[ ] Stable


I see consistent failures to start (CNFE) with the -security option on 
win32. I haven't tested on Linux and I couldn't see a configuration 
solution to the CNFE.




I can't recreate this with Linux or OS X...


I'll do some more testing to make sure I didn't introduce this with some 
local change.


Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Release build 6.0.17

2008-07-15 Thread Mark Thomas

Mark Thomas wrote:

Jim Jagielski wrote:


On Jul 13, 2008, at 6:19 PM, Mark Thomas wrote:


Remy Maucherat wrote:

The candidates binaries are available here:
http://people.apache.org/~remm/tomcat-6/v6.0.17/
According to the release process, the 6.0.17 tag is:
[ ] Broken
[ ] Alpha
[X] Beta
[ ] Stable


I see consistent failures to start (CNFE) with the -security option 
on win32. I haven't tested on Linux and I couldn't see a 
configuration solution to the CNFE.




I can't recreate this with Linux or OS X...


I'll do some more testing to make sure I didn't introduce this with some 
local change.


There is something screwy with my TC6 build environment. On a different 
machine I can't reproduce this. I suspect my related patch is bad too. I'll 
do some more testing tonight with my main environment.


In the meantime, I withdraw my Beta vote.

Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r676839 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-07-15 Thread markt
Author: markt
Date: Tue Jul 15 02:07:34 2008
New Revision: 676839

URL: http://svn.apache.org/viewvc?rev=676839&view=rev
Log:
Withdraw patch pending further investigation. Root cause appears to be my build 
environment rather than a bug.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=676839&r1=676838&r2=676839&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jul 15 02:07:34 2008
@@ -71,11 +71,6 @@
   -1: remm: I look at the code, and implicitly it is not the right way to 
close a stream; 
 this should be in the finally with the usual try { if(!null) } 
catch (IOE)
 
-* Fix startup failure when security is enabled
-  http://people.apache.org/~markt/patches/2008-07-13-security-manager.patch
-  +1: markt
-  -1: 
-
 *  Backport r676510 from trunk. The patch embeds tcnative-1.dll inside
exe installer and uses the released binary from ASF site instead
downloading tomcat-native at install time from tomcat.heanet.ie.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r676843 - /tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

2008-07-15 Thread markt
Author: markt
Date: Tue Jul 15 02:14:21 2008
New Revision: 676843

URL: http://svn.apache.org/viewvc?rev=676843&view=rev
Log:
Revert changes as root cause of issue appears to be strangeness in my build 
environment.

Modified:
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=676843&r1=676842&r2=676843&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Tue 
Jul 15 02:14:21 2008
@@ -63,6 +63,9 @@
 (basePackage +
  "core.ContainerBase$PrivilegedAddChild");
 loader.loadClass
+(basePackage +
+ "core.StandardWrapper$1");
+loader.loadClass
(basePackage +
  "core.ApplicationHttpRequest$AttributeNamesEnumerator");
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Release build 6.0.17

2008-07-15 Thread Remy Maucherat
On Tue, 2008-07-15 at 10:06 +0100, Mark Thomas wrote:
> There is something screwy with my TC6 build environment. On a different 
> machine I can't reproduce this. I suspect my related patch is bad too. I'll 
> do some more testing tonight with my main environment.
> 
> In the meantime, I withdraw my Beta vote.

I'll wait a bit and do some testing too.

Rémy



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r676944 - /tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java

2008-07-15 Thread markt
Author: markt
Date: Tue Jul 15 08:51:44 2008
New Revision: 676944

URL: http://svn.apache.org/viewvc?rev=676944&view=rev
Log:
As Remy pointed out, this really should be in the finally block.

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java?rev=676944&r1=676943&r2=676944&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java Tue Jul 15 
08:51:44 2008
@@ -1728,16 +1728,20 @@
 }
 } //replacement for Process.waitFor()
 
-// Close the output stream if used
-if (cgiOutput != null) {
-cgiOutput.close();
-}
 }
 catch (IOException e){
 log ("Caught exception " + e);
 throw e;
 }
 finally{
+// Close the output stream if used
+if (cgiOutput != null) {
+try {
+cgiOutput.close();
+} catch (IOException ioe) {
+log ("Exception closing output stream " + ioe);
+}
+}
 if (debug > 4) {
 log ("Running finally block");
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r676945 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-07-15 Thread markt
Author: markt
Date: Tue Jul 15 08:56:49 2008
New Revision: 676945

URL: http://svn.apache.org/viewvc?rev=676945&view=rev
Log:
Respond to Remy's comment.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=676945&r1=676944&r2=676945&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jul 15 08:56:49 2008
@@ -65,11 +65,9 @@
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42722
   Possible NPE in CGI Servlet
-  Patch provided by Nils Hammar
-  http://svn.apache.org/viewvc?rev=675751&view=rev
+  http://people.apache.org/~markt/patches/2008-07-15-bug42722.patch
   +1: markt
-  -1: remm: I look at the code, and implicitly it is not the right way to 
close a stream; 
-this should be in the finally with the usual try { if(!null) } 
catch (IOE)
+  -1: 
 
 *  Backport r676510 from trunk. The patch embeds tcnative-1.dll inside
exe installer and uses the released binary from ASF site instead



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Release build 6.0.17

2008-07-15 Thread Jim Jagielski


On Jul 14, 2008, at 2:12 PM, Jim Jagielski wrote:



On Jul 13, 2008, at 6:19 PM, Mark Thomas wrote:


Remy Maucherat wrote:

The candidates binaries are available here:
http://people.apache.org/~remm/tomcat-6/v6.0.17/
According to the release process, the 6.0.17 tag is:
[ ] Broken
[ ] Alpha
[X] Beta
[ ] Stable


I see consistent failures to start (CNFE) with the -security option  
on win32. I haven't tested on Linux and I couldn't see a  
configuration solution to the CNFE.




I can't recreate this with Linux or OS X...



FWIW: I vote +1 Stable.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r676949 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-07-15 Thread remm
Author: remm
Date: Tue Jul 15 09:07:53 2008
New Revision: 676949

URL: http://svn.apache.org/viewvc?rev=676949&view=rev
Log:
- Votes.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=676949&r1=676948&r2=676949&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jul 15 09:07:53 2008
@@ -66,11 +66,11 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42722
   Possible NPE in CGI Servlet
   http://people.apache.org/~markt/patches/2008-07-15-bug42722.patch
-  +1: markt
+  +1: markt, remm
   -1: 
 
 *  Backport r676510 from trunk. The patch embeds tcnative-1.dll inside
exe installer and uses the released binary from ASF site instead
downloading tomcat-native at install time from tomcat.heanet.ie.
-   +1: mturk
+   +1: mturk, remm
-1:



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Patch - Don't follow symlinks for deletion

2008-07-15 Thread Michael Bailey
Can someone in the know comment on this? Is it intended behavior for tomcat
to follow symlinks when deleting the exploded directory during undeploy? Or
should I file a bug and attached this patch to it?

Michael Bailey

On Thu, Jul 3, 2008 at 11:27 AM, Michael Bailey <[EMAIL PROTECTED]>
wrote:

> Patch pasted in case the attachement didn't make throught the list:
>
> Index: java/org/apache/tomcat/util/FileUtils.java
> ===
> --- java/org/apache/tomcat/util/FileUtils.java  (revision 0)
> +++ java/org/apache/tomcat/util/FileUtils.java  (revision 0)
> @@ -0,0 +1,55 @@
> +package org.apache.tomcat.util;
> +
> +import java.io.File;
> +import java.io.IOException;
> +
> +
> +public class FileUtils {
> +
> +/**
> + * Delete dir recursively never following symlinks
> + * @param dir
> + */
> +public static  boolean deleteDir(File dir) {
> +boolean mightBeSymlink;
> +try {
> +mightBeSymlink = isSymLink(dir);
> +} catch (IOException e) {
> +mightBeSymlink = true;
> +}
> +
> +if (mightBeSymlink) {
> +return dir.delete();
> +} else {
> +String files[] = dir.list();
> +if (files == null) {
> +files = new String[0];
> +}
> +for (int i = 0; i < files.length; i++) {
> +File file = new File(dir, files[i]);
> +if (file.isDirectory()) {
> +deleteDir(file);
> +} else {
> +file.delete();
> +}
> +}
> +return dir.delete();
> +}
> +
> +}
> +
> +/**
> + * Trys to determine if the last path component is a symlink
> + *
> + * @param file
> + * @return true if it is a symlink
> + * @throws IOException - if we run into trouble examining the
> file, the file may or may not be a symlink
> + * if this exception is thrown.
> + */
> +public static boolean isSymLink(File file) throws IOException {
> +String path1 =
> (file.getAbsoluteFile().getParentFile().getCanonicalPath() +
> File.separatorChar + file.getName());
> +String path2 = (file.getAbsoluteFile().getCanonicalPath());
> +return !path1.equals(path2);
> +}
> +
> +}
> Index: java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
> ===
> --- java/org/apache/catalina/ha/deploy/FarmWarDeployer.java (revision
> 672932)
> +++ java/org/apache/catalina/ha/deploy/FarmWarDeployer.java (working
> copy)
> @@ -36,6 +36,7 @@
>  import org.apache.catalina.ha.ClusterMessage;
>  import org.apache.catalina.tribes.Member;
>  import org.apache.tomcat.util.modeler.Registry;
> +import org.apache.tomcat.util.FileUtils;
>
>
>  /**
> @@ -580,21 +581,7 @@
>  *File object representing the directory to be deleted
>  */
> protected void undeployDir(File dir) {
> -
> -String files[] = dir.list();
> -if (files == null) {
> -files = new String[0];
> -}
> -for (int i = 0; i < files.length; i++) {
> -File file = new File(dir, files[i]);
> -if (file.isDirectory()) {
> -undeployDir(file);
> -} else {
> -file.delete();
> -}
> -}
> -dir.delete();
> -
> +FileUtils.deleteDir(dir);
> }
>
> /*
> Index: java/org/apache/catalina/startup/ExpandWar.java
> ===
> --- java/org/apache/catalina/startup/ExpandWar.java (revision 672932)
> +++ java/org/apache/catalina/startup/ExpandWar.java (working copy)
> @@ -35,6 +35,7 @@
>  import org.apache.catalina.util.StringManager;
>  import org.apache.juli.logging.Log;
>  import org.apache.juli.logging.LogFactory;
> +import org.apache.tomcat.util.FileUtils;
>
>  /**
>  * Expand out a WAR in a Host's appBase.
> @@ -274,21 +275,7 @@
>  * @param dir File object representing the directory to be deleted
>  */
> public static boolean deleteDir(File dir) {
> -
> -String files[] = dir.list();
> -if (files == null) {
> -files = new String[0];
> -}
> -for (int i = 0; i < files.length; i++) {
> -File file = new File(dir, files[i]);
> -if (file.isDirectory()) {
> -deleteDir(file);
> -} else {
> -file.delete();
> -}
> -}
> -return dir.delete();
> -
> +  return FileUtils.deleteDir(dir);
> }
>
>
> Index: java/org/apache/catalina/loader/WebappClassLoader.java
> ===
> --- java/org/apache/catalina/loader/WebappClassLoader.java  (revision
> 672932)
> +++ java/org/apache/catalina/loader/WebappClassLoader.java  (workin

Re: Patch - Don't follow symlinks for deletion

2008-07-15 Thread Jason Brittain
Michael:

It sounds like a good change.  I have not tried the patch (BTW: I
believe that FarmWarDeployer is now considered
unsupported/deprecated), but the theory here sounds right.  I think it
makes sense to consolidate the implementations of the code that
removes the files, if they are basically the same (it appears that
they are).  I also would expect Tomcat to just remove the symlink to
an external file or directory, instead of following the symlink and
deleting the external file or dir as well.  That was probably
unintentional behavior.

Thanks for the investigation and the patch!

--
Jason Brittain

On Tue, Jul 15, 2008 at 10:06 AM, Michael Bailey
<[EMAIL PROTECTED]> wrote:
> Can someone in the know comment on this? Is it intended behavior for tomcat
> to follow symlinks when deleting the exploded directory during undeploy? Or
> should I file a bug and attached this patch to it?
>
> Michael Bailey
>
> On Thu, Jul 3, 2008 at 11:27 AM, Michael Bailey <[EMAIL PROTECTED]>
> wrote:
>
>> Patch pasted in case the attachement didn't make throught the list:
>>
>> Index: java/org/apache/tomcat/util/FileUtils.java
>> ===
>> --- java/org/apache/tomcat/util/FileUtils.java  (revision 0)
>> +++ java/org/apache/tomcat/util/FileUtils.java  (revision 0)
>> @@ -0,0 +1,55 @@
>> +package org.apache.tomcat.util;
>> +
>> +import java.io.File;
>> +import java.io.IOException;
>> +
>> +
>> +public class FileUtils {
>> +
>> +/**
>> + * Delete dir recursively never following symlinks
>> + * @param dir
>> + */
>> +public static  boolean deleteDir(File dir) {
>> +boolean mightBeSymlink;
>> +try {
>> +mightBeSymlink = isSymLink(dir);
>> +} catch (IOException e) {
>> +mightBeSymlink = true;
>> +}
>> +
>> +if (mightBeSymlink) {
>> +return dir.delete();
>> +} else {
>> +String files[] = dir.list();
>> +if (files == null) {
>> +files = new String[0];
>> +}
>> +for (int i = 0; i < files.length; i++) {
>> +File file = new File(dir, files[i]);
>> +if (file.isDirectory()) {
>> +deleteDir(file);
>> +} else {
>> +file.delete();
>> +}
>> +}
>> +return dir.delete();
>> +}
>> +
>> +}
>> +
>> +/**
>> + * Trys to determine if the last path component is a symlink
>> + *
>> + * @param file
>> + * @return true if it is a symlink
>> + * @throws IOException - if we run into trouble examining the
>> file, the file may or may not be a symlink
>> + * if this exception is thrown.
>> + */
>> +public static boolean isSymLink(File file) throws IOException {
>> +String path1 =
>> (file.getAbsoluteFile().getParentFile().getCanonicalPath() +
>> File.separatorChar + file.getName());
>> +String path2 = (file.getAbsoluteFile().getCanonicalPath());
>> +return !path1.equals(path2);
>> +}
>> +
>> +}
>> Index: java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
>> ===
>> --- java/org/apache/catalina/ha/deploy/FarmWarDeployer.java (revision
>> 672932)
>> +++ java/org/apache/catalina/ha/deploy/FarmWarDeployer.java (working
>> copy)
>> @@ -36,6 +36,7 @@
>>  import org.apache.catalina.ha.ClusterMessage;
>>  import org.apache.catalina.tribes.Member;
>>  import org.apache.tomcat.util.modeler.Registry;
>> +import org.apache.tomcat.util.FileUtils;
>>
>>
>>  /**
>> @@ -580,21 +581,7 @@
>>  *File object representing the directory to be deleted
>>  */
>> protected void undeployDir(File dir) {
>> -
>> -String files[] = dir.list();
>> -if (files == null) {
>> -files = new String[0];
>> -}
>> -for (int i = 0; i < files.length; i++) {
>> -File file = new File(dir, files[i]);
>> -if (file.isDirectory()) {
>> -undeployDir(file);
>> -} else {
>> -file.delete();
>> -}
>> -}
>> -dir.delete();
>> -
>> +FileUtils.deleteDir(dir);
>> }
>>
>> /*
>> Index: java/org/apache/catalina/startup/ExpandWar.java
>> ===
>> --- java/org/apache/catalina/startup/ExpandWar.java (revision 672932)
>> +++ java/org/apache/catalina/startup/ExpandWar.java (working copy)
>> @@ -35,6 +35,7 @@
>>  import org.apache.catalina.util.StringManager;
>>  import org.apache.juli.logging.Log;
>>  import org.apache.juli.logging.LogFactory;
>> +import org.apache.tomcat.util.FileUtils;
>>
>>  /**
>>  * Expand out a WAR in a Host's appBase.
>> @@ -274,21 +275,7 @@
>>  * @param dir File object representing the directory to be deleted
>>  */
>> publi

DO NOT REPLY [Bug 45403] New: Tomcat does not reload application

2008-07-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45403

   Summary: Tomcat does not reload application
   Product: Tomcat 6
   Version: 6.0.16
  Platform: Sun
OS/Version: Solaris
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Tomcat does not reload application if
 1)a file in WEB-INF/lib is a symbolic link file, and
 2)the actual file of the symbolic link file changed, and
 3)allowLinking attribute is false

In case of the above, Tomcat throws a NamingException.
Application reloading works well if allowLinking attribute is set to true.
The reason of the above would be as allows.


WebappClassLoader:addJar

  long lastModified =
  ((ResourceAttributes) resources.getAttributes(jar))
   .getLastModified();



I was wondering if application reloading should work when allowLinking
attribute
is false.
Or should Tomcat disregard the Jar (doesn't load it)
when "allowLinking=false"?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 45403] Tomcat does not reload application

2008-07-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45403





--- Comment #1 from kawasima <[EMAIL PROTECTED]>  2008-07-15 19:25:17 PST ---
When allowlinging attribute is false, application can load class in jar file.

But, when the actual file of the symbolic link file changed,
tomcat does not reload application.

It is contradictory.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]