Re: cvs commit:jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5InputBuffer.java
On Sun, 2003-01-05 at 18:20, [EMAIL PROTECTED] wrote: remm2003/01/05 09:20:41 Modified:coyote/src/java/org/apache/coyote/tomcat5 InputBuffer.java Log: - Fix skip and reset. Revision ChangesPath 1.3 +14 -9 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/InputBuffer.java Index: InputBuffer.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/InputBuffer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- InputBuffer.java5 Jan 2003 13:26:39 - 1.2 +++ InputBuffer.java5 Jan 2003 17:20:41 - 1.3 @@ -413,13 +413,19 @@ long nRead = 0; while (nRead n) { -if (cb.getLength() n) { +if (cb.getLength() = n) { cb.setOffset(cb.getStart() + (int) n); nRead = n; } else { nRead += cb.getLength(); cb.setOffset(cb.getEnd()); -int nb = realReadChars(cb.getChars(), 0, cb.getEnd()); +int toRead = 0; +if (cb.getChars().length (n - nRead)) { +toRead = cb.getChars().length; +} else { +toRead = (int) (n - nRead); +} +int nb = realReadChars(cb.getChars(), 0, toRead); what about int nb = realReadChars(cb.getChars(), 0, Math.max(cb.getChars().length, (int) (n - nRead))); ? Jerome -- Jerome Lacoste (Frisurf) [EMAIL PROTECTED] CoffeeBreaks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [5.0] Input optimization
On Sun, 2003-01-05 at 18:40, Remy Maucherat wrote: Costin Manolache wrote: Great ! If you could come up with a better name for the substract method ;-) It's supposed to be the opposite of append. I found this: From The Collaborative International Dictionary of English v.0.44 [gcide]: Disappendent \Dis`ap*pendent\, a. Freed from a former connection or dependence; disconnected. [R.] [1913 Webster] But I don't like it much. untie() neither. Perhaps changing append() would make it easier to find an opposite ? J -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/jk/xdocs/jkworkershowto.xml
const char *wname) { +int rc = JK_TRUE; +char buf[1024]; +if (m wname) { +int value; +sprintf(buf, %s.%s.%s, PREFIX_OF_WORKER, wname, STICKY_SESSION); Seeing that checkin I got curious and I had a look at the code. I saw that this sprintf is used a lot in that way. Was wondering if there was a way to pass some parameters to overflow the buffer. Especially if the name comes from a property read from a file. I didn't see any special protection checking the length of the parameters, wname in that case. Am I wrong? J. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: cvs commit:jakarta-tomcat-connectors/jk/xdocs/jk workershowto.xml
On Fri, 2003-01-03 at 12:52, Tim Funk wrote: wname is the worker name. This name is the name of the worker as defined in the JK property config file. Eg: worker.tomcat1.host=localhost ^^^ For example above: tomcat1 is the worker name. If someone were to attempt a buffer overflow, they would need write access to the Jk config file. (Then have enough permission/patience until apache is restarted). That's what I was thinking of. Bad permissions on the file can create a risk. It is not likely, but that is one way of getting bigger privileges. Of course that would mean the admin runs tomcat as root in order to be exploitable. I do not think this is a problem (except for the admin of the box). OK. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[Fwd: tomcat/apache connector startup failure: NCDFE fprorg/apache/commons/logging/LogFactory]
Forwarding this to the dev list as it seems to be a problem with tomcat. Cheers, J. ---BeginMessage--- Having trouble to make ajp13 connector work (jk2 with Apache 2). Tomcat fails connecting initializing with the following error: SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory As a consequence of this problem (I think it is related), I cannot access the dynamic pages from apache. Tomcat works great (http://localhost:8080/examples/) while http://localhost/examples/ returns a 500 Error (Connection refused on port 8019 - errno 111). (nb: I modified the default port to be 8019 instead of 8009). I've tried several variations of the jk2.properties and workers2.properties without success. Spent a lot of time on the mailing lists archives without success neither. I moved the commons-logging.jar from $TOMCAT/server/lib/ to $TOMCAT/common/lib as advised in some mails. This didn't work. Even if if had worked, it seems it would have been inapropriate: see http://issues.apache.org/bugzilla/show_bug.cgi?id=13689 I also used the attached jsp deployed in $TOMCAT/webapps/ROOT to see the CLASSPATH which is outputed as /usr/local/java/lib/tools.jar:/opt/tomcat/bin/bootstrap.jar which seems normal to me. I didn't try to modify the CLASSPATH in catalina.sh as it doesn't seem like the correct thing to do neither. It seems like this is a ClassLoader problem. If there is a way to enable debugging for the class loader, I am also interested. I found this: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/loader.html But didn't find yet how to use it. It seems that I am not the only one to have had this problem. I spent already too much time on it so I will accept any idea/hints on how to make this work. I am using - linux OS (Mandrake 9.0) - JDK 1.4.1_01-b01 - tomcat-4.1.18-LE-jdk14.jar - jakarta-tomcat-connectors-4.1.18-src.tar.gz - Apache 2.0.43 Error details: INFO: Starting Coyote HTTP/1.1 on port 8080 Dec 30, 2002 8:58:03 PM org.apache.jk.server.JkMain newHandler SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.jk.server.JkMain.newHandler(JkMain.java:556) at org.apache.jk.server.JkMain.start(JkMain.java:341) at org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:169) at org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1056) at org.apache.catalina.core.StandardService.start(StandardService.java:506) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Dec 30, 2002 8:58:03 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Dec 30, 2002 8:58:03 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=2/239 config=/opt/tomcat/conf/jk2.properties -- Jerome Lacoste (Frisurf) [EMAIL PROTECTED] CoffeeBreaks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ---End Message--- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] Re: ThreadPool
BTW, can't Linux 2.5/2.6 handle thousands of threads without any problem ? I remember reading an iterview of Ingo who said JVM performance and thread handling should be way better in 2.6. You're right, and Java should be one to benefit well from it. But if the kernel period freeze lasts as long as the last one, we won't have 2.6.0 before 10 months, and give it another 4-5 months before it gets used in mainline distrib (last Debian uses 2.2 by default if I am correct :)) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]