tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Piggott <cpigg...@gmail.com>
Subject UDP fails, but doesn't throw a SecurityException
Date Wed, 24 Jun 2009 16:51:13 GMT
I have a servlet that sends and listens to a local UDP service.  To
allow this, I established the following policy:

grant codebase "file:${catalina.base}/webapps/modbus/-" {
        permission java.net.SocketPermission "localhost:502", "connect";

};


This allowed packets out to the external service, but not responses.
I changed it as follows:

grant codebase "file:${catalina.base}/webapps/modbus/-" {
        permission java.net.SocketPermission "localhost:502",
"connect,accept,listen";

};

and it started working.

The client library in question creates a DatagramSocket(), then calls
receive() on it with a timeout.  Before adding "accept,listen" t
always timed out.

Version information:
	Tomcat/6.0.18
	JVM	1.6.0_13-b03 	Sun Microsystems Inc
	O/S Linux 	2.6.28-13-server 	i386


Here's my question: if this was failing, why didn't it throw a
SecurityException?  It would have been less challenging to figure out
what was going on had there been one.

--Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message