How to accept resolv on all hosts?

Hi,
My web application is running under a security policy and I don't know how to write a rule to allow the application to resolve all host names. Is it possible to write a policy rule like:
grant codeBase "file:/usr/local/webapps/myapp/-" {
    permission java.net.SocketPermission "*", "resolve";
};According to the SocketPermission javadoc, the "*" is only allowed at the left of a domain suffix and this former syntax is not supported.
How can I write such a rule?
Thanks for any hint.

You are perfectly right! Looking at the source code for SocketPermission, at least for JDK1.5:
     // is this a domain wildcard specification
     if (host.lastIndexOf('*') > 0) {
         throw new
            IllegalArgumentException("invalid host wildcard specification");
     } else if (host.startsWith("*")) {
         wildcard = true;
         if (host.equals("*")) {
          cname = "";
         } else if (host.startsWith("*.")) {The conclusion: never trust javadoc, but experiment!
Thanks.

Similar Messages

Maybe you are looking for

  • To install windows 8 or 7 on mac pro (10.9.5)

    Hi I'd like to install windows 7 or 8 on my macbook pro(10.9.5).I tried reading how to do that but there's no success could anyone tell in detail how to do that?

  • Urgent- xml parsing failed - xmlelement

    hi what am i doing wrong here? oracle 10.2.0.1 AL32UTF8 charset. trying to generate an xml using xdk running this SELECT XMLELEMENT("date", sysdate) FROM dual expecting this <date>2005-10-25</date> getting this ORA-31011: XML parsing failed tried thi

  • SQl*Modeler - foreign key amendment error

    SQl*Modeler 2.0.0 Build 584 (Windows) Oracle 10.2.0.4 Solaris If I change an existing foreign key to simply change the delete rule (from say CASCADE to RESTRICT) it changes in memory just fine. If I generate the DDL the change has happened and I get

  • I am looking for network controller driver

    I have Satellite M70 notebook. Help me please!

  • No  audio input for audio channels

    i have installed logic express 7.0 on my macbook pro, but not upgraded to 7.2. the problem i am having is that i have no input to select on the channel strip of my audio channels. on my powerpc imac, without any audio interface hooked up, it shows in