DO NOT REPLY [Bug 41828] - mod_jk file locking (flock) causes kernel panic

2007-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41828





--- Additional Comments From [EMAIL PROTECTED]  2007-03-17 03:48 ---
Thank you for your lots of works.

My concern is that the shared memory is not locked exclusively among all the
processes, rather than kernel panic.

If the shared memory is not locked properly, other processes may overwrite
the shared data when someone is updating the shared data.  Is this OK?

By the way, the kernel panic can also be avoided by using fcntl instead of
flock.  It's flock bug.
This is done by setting HAVE_FLOCK to 0 in portable.h before doing make, 
though it may not be recommended.

Thanks.


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

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



DO NOT REPLY [Bug 41828] - mod_jk file locking (flock) causes kernel panic

2007-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41828





--- Additional Comments From [EMAIL PROTECTED]  2007-03-17 04:20 ---
Hmm,

It might sense to use the fcntl by default if present.
Further more flock doesn't lock on NFS volumes, so it makes sense to try
using fcntl if present.

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

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



DO NOT REPLY [Bug 41864] - Wrong link on default home page

2007-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41864





--- Additional Comments From [EMAIL PROTECTED]  2007-03-17 07:52 ---
Most of the links on http://tomcat.apache.org/tomcat-6.0-doc/index.html go 
nowhere.

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

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



svn commit: r519362 - in /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf: CharChunk.java UDecoder.java

2007-03-17 Thread markt
Author: markt
Date: Sat Mar 17 09:18:18 2007
New Revision: 519362

URL: http://svn.apache.org/viewvc?view=rev&rev=519362
Log:
Tabs -> 8 spaces

Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java?view=diff&rev=519362&r1=519361&r2=519362
==
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java 
(original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java 
Sat Mar 17 09:18:18 2007
@@ -31,7 +31,7 @@
  * @author Costin Manolache
  * @author Remy Maucherat
  */
-public final class CharChunk implements Cloneable, Serializable, CharSequence {
+public final class CharChunk implements Cloneable, Serializable {
 
 // Input interface, used when the buffer is emptied.
 public static interface CharInputChannel {
@@ -698,7 +698,7 @@
 return buff[index + start];
 }
 
-public CharSequence subSequence(int start, int end) {
+public CharChunk subSequence(int start, int end) {
 try {
 CharChunk result = (CharChunk) this.clone();
 result.setOffset(this.start + start);

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java?view=diff&rev=519362&r1=519361&r2=519362
==
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java 
(original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/UDecoder.java 
Sat Mar 17 09:18:18 2007
@@ -30,8 +30,10 @@
  */
 public final class UDecoder {
 
-protected static final boolean ALLOW_ENCODED_SLASH = 
-
Boolean.valueOf(System.getProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH",
 "false")).booleanValue();
+protected static final boolean ALLOW_ENCODED_SLASH = Boolean.valueOf(
+System.getProperty(
+"org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH",
+"false")).booleanValue();
 
 public UDecoder() 
 {
@@ -49,53 +51,53 @@
 /** URLDecode, will modify the source.
  */
 public void convert( ByteChunk mb, boolean query )
-   throws IOException
+throws IOException
 {
-   int start=mb.getOffset();
-   byte buff[]=mb.getBytes();
-   int end=mb.getEnd();
+int start=mb.getOffset();
+byte buff[]=mb.getBytes();
+int end=mb.getEnd();
 
-   int idx= ByteChunk.indexOf( buff, start, end, '%' );
+int idx= ByteChunk.indexOf( buff, start, end, '%' );
 int idx2=-1;
 if( query )
 idx2= ByteChunk.indexOf( buff, start, end, '+' );
-   if( idx<0 && idx2<0 ) {
-   return;
-   }
-
-   // idx will be the smallest positive inxes ( first % or + )
-   if( idx2 >= 0 && idx2 < idx ) idx=idx2;
-   if( idx < 0 ) idx=idx2;
+if( idx<0 && idx2<0 ) {
+return;
+}
+
+// idx will be the smallest positive inxes ( first % or + )
+if( idx2 >= 0 && idx2 < idx ) idx=idx2;
+if( idx < 0 ) idx=idx2;
 
-   boolean noSlash = !(ALLOW_ENCODED_SLASH || query);
+boolean noSlash = !(ALLOW_ENCODED_SLASH || query);
 
-   for( int j=idx; j= end ) {
-   throw new CharConversionException("EOF");
-   }
-   byte b1= buff[j+1];
-   byte b2=buff[j+2];
-   if( !isHexDigit( b1 ) || ! isHexDigit(b2 ))
-   throw new CharConversionException( "isHexDigit");
-   
-   j+=2;
-   int res=x2c( b1, b2 );
+for( int j=idx; j= end ) {
+throw new CharConversionException("EOF");
+}
+byte b1= buff[j+1];
+byte b2=buff[j+2];
+if( !isHexDigit( b1 ) || ! isHexDigit(b2 ))
+throw new CharConversionException( "isHexDigit");
+
+j+=2;
+int res=x2c( b1, b2 );
 if (noSlash && (res == '/')) {
 throw new CharConversionException( "noSlash");
 }
-   buff[idx]=(byte)res;
-   }
-   }
-
-   mb.setEnd( idx );
-   
-   return;
+buff[idx]=(byte)res;
+}
+}
+
+mb.setEnd( idx );
+
+return;
 }
 
 //  Additional methods 
@@ -105,7 +107,7 @@
  *  Includes converting  '+' to ' '.

svn commit: r519366 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java

2007-03-17 Thread markt
Author: markt
Date: Sat Mar 17 09:43:25 2007
New Revision: 519366

URL: http://svn.apache.org/viewvc?view=rev&rev=519366
Log:
Revert change included in previous commit by accident.

Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java

Modified: 
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java?view=diff&rev=519366&r1=519365&r2=519366
==
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java 
(original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java 
Sat Mar 17 09:43:25 2007
@@ -31,7 +31,7 @@
  * @author Costin Manolache
  * @author Remy Maucherat
  */
-public final class CharChunk implements Cloneable, Serializable {
+public final class CharChunk implements Cloneable, Serializable, CharSequence {
 
 // Input interface, used when the buffer is emptied.
 public static interface CharInputChannel {
@@ -698,7 +698,7 @@
 return buff[index + start];
 }
 
-public CharChunk subSequence(int start, int end) {
+public CharSequence subSequence(int start, int end) {
 try {
 CharChunk result = (CharChunk) this.clone();
 result.setOffset(this.start + start);



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



svn commit: r519367 - /tomcat/connectors/trunk/jni/

2007-03-17 Thread markt
Author: markt
Date: Sat Mar 17 09:51:13 2007
New Revision: 519367

URL: http://svn.apache.org/viewvc?view=rev&rev=519367
Log:
Ignore non-source dir

Modified:
tomcat/connectors/trunk/jni/   (props changed)

Propchange: tomcat/connectors/trunk/jni/
--
--- svn:ignore (added)
+++ svn:ignore Sat Mar 17 09:51:13 2007
@@ -0,0 +1 @@
+dist



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



svn commit: r519369 - /tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java

2007-03-17 Thread markt
Author: markt
Date: Sat Mar 17 10:00:55 2007
New Revision: 519369

URL: http://svn.apache.org/viewvc?view=rev&rev=519369
Log:
Add option for handling URL chars, backport from TC 6.0.x

Modified:

tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java

Modified: 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java?view=diff&rev=519369&r1=519368&r2=519369
==
--- 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java
 (original)
+++ 
tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java
 Sat Mar 17 10:00:55 2007
@@ -51,6 +51,10 @@
 final class CoyoteAdapter
 implements Adapter {
 
+protected static final boolean ALLOW_BACKSLASH = Boolean.valueOf(
+System.getProperty(
+"org.apache.coyote.tomcat4.CoyoteAdapter.ALLOW_BACKSLASH",
+"false")).booleanValue();
 
 // -- Constants
 
@@ -440,8 +444,12 @@
 return "/";
 
 // Normalize the slashes and add leading slash if necessary
-if (normalized.indexOf('\\') >= 0)
-normalized = normalized.replace('\\', '/');
+if (normalized.indexOf('\\') >= 0) {
+if ( ALLOW_BACKSLASH )
+normalized = normalized.replace('\\', '/');
+else 
+return null;
+}
 if (!normalized.startsWith("/"))
 normalized = "/" + normalized;
 
@@ -564,8 +572,12 @@
 // Replace '\' with '/'
 // Check for null byte
 for (pos = start; pos < end; pos++) {
-if (b[pos] == (byte) '\\')
-b[pos] = (byte) '/';
+if (b[pos] == (byte) '\\') {
+if (ALLOW_BACKSLASH)
+b[pos] = (byte) '/';
+else 
+return false;
+}
 if (b[pos] == (byte) 0)
 return false;
 }



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



Re: svn commit: r519367 - /tomcat/connectors/trunk/jni/

2007-03-17 Thread Mladen Turk

[EMAIL PROTECTED] wrote:

Modified:
tomcat/connectors/trunk/jni/   (props changed)

Propchange: tomcat/connectors/trunk/jni/
--
--- svn:ignore (added)
+++ svn:ignore Sat Mar 17 09:51:13 2007



Can you explain why you add that, and why we were able
to live without it so far?

Regards,
Mladen.

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



Re: svn commit: r519367 - /tomcat/connectors/trunk/jni/

2007-03-17 Thread Mark Thomas
Mladen Turk wrote:
> [EMAIL PROTECTED] wrote:
>> Modified:
>> tomcat/connectors/trunk/jni/   (props changed)
>>
>> Propchange: tomcat/connectors/trunk/jni/
>> --
>>
>> --- svn:ignore (added)
>> +++ svn:ignore Sat Mar 17 09:51:13 2007
> 
> 
> Can you explain why you add that, and why we were able
> to live without it so far?

I did it because the presence of the dist directory was causing svn to
think that there were files under jni to be added to svn.

It wasn't done before because either nobody noticed or nobody cared.

Mark


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



svn commit: r519443 - /tomcat/container/branches/tc4.1.x/webapps/manager/build.xml

2007-03-17 Thread markt
Author: markt
Date: Sat Mar 17 14:11:13 2007
New Revision: 519443

URL: http://svn.apache.org/viewvc?view=rev&rev=519443
Log:
Further tweak to 1.3/1.4 build process to add back some missing help files.

Modified:
tomcat/container/branches/tc4.1.x/webapps/manager/build.xml

Modified: tomcat/container/branches/tc4.1.x/webapps/manager/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc4.1.x/webapps/manager/build.xml?view=diff&rev=519443&r1=519442&r2=519443
==
--- tomcat/container/branches/tc4.1.x/webapps/manager/build.xml (original)
+++ tomcat/container/branches/tc4.1.x/webapps/manager/build.xml Sat Mar 17 
14:11:13 2007
@@ -15,6 +15,7 @@
   
   
 
+  
 
   
   
@@ -35,8 +36,23 @@
   
 
 
+  
+  
+
+  
+  
+  
+
+  
+
+
   
-  
+  
 
 
   



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



svn commit: r519466 - /tomcat/container/branches/tc3.3.x/src/share/org/apache/tomcat/util/io/FileUtil.java

2007-03-17 Thread billbarker
Author: billbarker
Date: Sat Mar 17 15:41:09 2007
New Revision: 519466

URL: http://svn.apache.org/viewvc?view=rev&rev=519466
Log:
The '\\' char isn't a special char in a URI

Modified:

tomcat/container/branches/tc3.3.x/src/share/org/apache/tomcat/util/io/FileUtil.java

Modified: 
tomcat/container/branches/tc3.3.x/src/share/org/apache/tomcat/util/io/FileUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc3.3.x/src/share/org/apache/tomcat/util/io/FileUtil.java?view=diff&rev=519466&r1=519465&r2=519466
==
--- 
tomcat/container/branches/tc3.3.x/src/share/org/apache/tomcat/util/io/FileUtil.java
 (original)
+++ 
tomcat/container/branches/tc3.3.x/src/share/org/apache/tomcat/util/io/FileUtil.java
 Sat Mar 17 15:41:09 2007
@@ -111,8 +111,8 @@
if( path==null || path.equals("") ) return base;

String normP=path;
-   if( path.indexOf('\\') >=0 )
-   normP= path.replace('\\', '/');
+   //if( path.indexOf('\\') >=0 )
+   //normP= path.replace('\\', '/');
if ( !normP.startsWith("/"))
normP = "/" + normP;
 



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



svn commit: r519518 - /tomcat/tc6.0.x/trunk/webapps/docs/aio.xml

2007-03-17 Thread fhanik
Author: fhanik
Date: Sat Mar 17 18:59:31 2007
New Revision: 519518

URL: http://svn.apache.org/viewvc?view=rev&rev=519518
Log:
added note about timeouts

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/aio.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/aio.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/aio.xml?view=diff&rev=519518&r1=519517&r2=519518
==
--- tomcat/tc6.0.x/trunk/webapps/docs/aio.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/aio.xml Sat Mar 17 18:59:31 2007
@@ -248,6 +248,17 @@
   
   
   
+  
+If you are using the NIO connector, you can set individual timeouts for 
your different comet connections.
+   To set a timeout, simple set a request attribute like the following 
code shows:
+   
event.getHttpServletRequest().setAttribute("org.apache.tomcat.comet.timeout",
 new Integer(30 * 1000));
+   This sets the timeout to 30 seconds.
+   Important note, in order to set this timeout, it has to be done on the 
BEGIN event.
+   The default value is soTimeout
+
+If you are using the APR connector, all Comet connections will have the 
same timeout value. It is soTimeout*50
+
+  
 
   
 



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



svn commit: r519568 - /tomcat/connectors/trunk/jni/native/src/sslcontext.c

2007-03-17 Thread mturk
Author: mturk
Date: Sun Mar 18 00:28:19 2007
New Revision: 519568

URL: http://svn.apache.org/viewvc?view=rev&rev=519568
Log:
Ask 3 times for passwords before giving up.

Modified:
tomcat/connectors/trunk/jni/native/src/sslcontext.c

Modified: tomcat/connectors/trunk/jni/native/src/sslcontext.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/src/sslcontext.c?view=diff&rev=519568&r1=519567&r2=519568
==
--- tomcat/connectors/trunk/jni/native/src/sslcontext.c (original)
+++ tomcat/connectors/trunk/jni/native/src/sslcontext.c Sun Mar 18 00:28:19 2007
@@ -438,7 +438,8 @@
 {
 BIO *bio = NULL;
 EVP_PKEY *key = NULL;
-void *cb_data = c->cb_data;
+tcn_pass_cb_t *cb_data = c->cb_data;
+int i;
 
 if ((bio = BIO_new(BIO_s_file())) == NULL) {
 return NULL;
@@ -449,17 +450,25 @@
 }
 if (!cb_data)
 cb_data = &tcn_password_callback;
-key = PEM_read_bio_PrivateKey(bio, NULL,
-(pem_password_cb *)SSL_password_callback,
-cb_data);
+for (i = 0; i < 3; i++) {
+key = PEM_read_bio_PrivateKey(bio, NULL,
+(pem_password_cb *)SSL_password_callback,
+(void *)cb_data);
+if (key)
+break;
+cb_data->password[0] = '\0';
+BIO_ctrl(bio, BIO_CTRL_RESET, 0, NULL);
+}
 BIO_free(bio);
 return key;
 }
 
-static X509 *load_pem_cert(const char *file)
+static X509 *load_pem_cert(tcn_ssl_ctxt_t *c, const char *file)
 {
 BIO *bio = NULL;
 X509 *cert = NULL;
+tcn_pass_cb_t *cb_data = c->cb_data;
+int i;
 
 if ((bio = BIO_new(BIO_s_file())) == NULL) {
 return NULL;
@@ -468,9 +477,15 @@
 BIO_free(bio);
 return NULL;
 }
-cert = PEM_read_bio_X509_AUX(bio, NULL,
-(pem_password_cb *)SSL_password_callback,
- NULL);
+for (i = 0; i < 3; i++) {
+cert = PEM_read_bio_X509_AUX(bio, NULL,
+(pem_password_cb *)SSL_password_callback,
+(void *)cb_data);
+if (cert)
+break;
+cb_data->password[0] = '\0';
+BIO_ctrl(bio, BIO_CTRL_RESET, 0, NULL);
+}
 BIO_free(bio);
 return cert;
 }
@@ -530,7 +545,7 @@
 rv = JNI_FALSE;
 goto cleanup;
 }
-if ((c->certs[idx] = load_pem_cert(cert_file)) == NULL) {
+if ((c->certs[idx] = load_pem_cert(c, cert_file)) == NULL) {
 ERR_error_string(ERR_get_error(), err);
 tcn_Throw(e, "Unable to load certificate %s (%s)",
   cert_file, err);



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