From: <jtc...@li...> - 2006-03-27 20:25:34
|
Update of /cvsroot/jtcfrost/frost-wot/source/frost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25315/source/frost Modified Files: FrostSecurityManager.java Log Message: fixes Index: FrostSecurityManager.java =================================================================== RCS file: /cvsroot/jtcfrost/frost-wot/source/frost/FrostSecurityManager.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FrostSecurityManager.java 27 Mar 2006 17:30:25 -0000 1.4 --- FrostSecurityManager.java 27 Mar 2006 20:25:30 -0000 1.5 *************** *** 40,45 **** for(Iterator i=nodes.iterator(); i.hasNext(); ) { FcpFactory.NodeAddress na = (FcpFactory.NodeAddress)i.next(); ! // TODO: should we allow any name lookups (port = -1) ??? ! if( port == na.port || port < 0 ) { if( host.equals(na.hostIp) || host.equals(na.hostName) ) { return; // host:port is in our list --- 40,47 ---- for(Iterator i=nodes.iterator(); i.hasNext(); ) { FcpFactory.NodeAddress na = (FcpFactory.NodeAddress)i.next(); ! if( port < 0 ) { ! return; // allow DNS lookups ! } ! if( port == na.port ) { if( host.equals(na.hostIp) || host.equals(na.hostName) ) { return; // host:port is in our list *************** *** 47,61 **** } } ! // host:port is not in our list throw new SecurityException("Connect to non-FCP host/port forbidden: "+host+":"+port); } public void checkConnect(String host, int port, Object context) { - // System.out.println("checkConnect(1):"+host+","+port); checkFrostConnect(host, port); super.checkConnect(host, port, context); } public void checkConnect(String host, int port) { - // System.out.println("checkConnect(2):"+host+","+port); checkFrostConnect(host, port); super.checkConnect(host, port); --- 49,61 ---- } } ! // host:port is not in our list throw new SecurityException("Connect to non-FCP host/port forbidden: "+host+":"+port); } public void checkConnect(String host, int port, Object context) { checkFrostConnect(host, port); super.checkConnect(host, port, context); } public void checkConnect(String host, int port) { checkFrostConnect(host, port); super.checkConnect(host, port); |