avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject svn commit: rev 36080 - avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl
Date Sun, 08 Aug 2004 07:58:13 GMT
Author: niclas
Date: Sun Aug  8 00:58:12 2004
New Revision: 36080

Modified:
   avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl/ConsoleImpl.java
Log:
Added that the localhost address is added by default.

Modified: avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl/ConsoleImpl.java
==============================================================================
--- avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl/ConsoleImpl.java
(original)
+++ avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl/ConsoleImpl.java
Sun Aug  8 00:58:12 2004
@@ -59,6 +59,7 @@
  *   <parameters>
  *     <parameter name="port" value="3333" />
  *     <parameter name="allow-deny" value="false" />
+ *     <parameter name="local-allow" value="true" />
  *     <parameter name="welcome-text" value="type 'help' form more info." />
  *   </parameters>
  * </pre>
@@ -66,6 +67,9 @@
  * if the host does not exist in the deny list, otherwise it is not allowed
  * unless the host exist in the allow list.
  * </p>
+ * <p>If <i>local-allow</i> is true, the localhost/127.0.0.1 is added to
the
+ * allow list. This is default, so one can connect without further parameterization
+ * or configuration.</p>
  *
  * <p>Configuration</p>
  * <pre>
@@ -138,6 +142,7 @@
      *   &lt;parameters&gt;
      *     &lt;parameter name="port" value="3333" /&gt;
      *     &lt;parameter name="allow-deny" value="false" /&gt;
+     *     &lt;parameter name="local-allow" value="true" /&gt;
      *     &lt;parameter name="welcome-text" value="type 'help' form more info." /&gt;
      *   &lt;/parameters&gt;
      * </pre>
@@ -148,6 +153,13 @@
         m_Port = params.getParameterAsInteger( "port", 3333 );
         m_Welcome = params.getParameter( "welcome-text", "type 'help' form more info." );
         m_Allow = params.getParameterAsBoolean( "deny-allow", false );
+        
+        boolean localAllow = params.getParameterAsBoolean( "allow-local", true );
+        if( localAllow )
+        {
+            InetAddress address = InetAddress.getByName( "127.0.0.1" );
+            m_Allows.add( address );
+        }
     }
     
     /**
@@ -171,6 +183,7 @@
      *     &lt;/connections&gt;
      *   &lt;/configuration&gt;
      * </pre>
+     *
      */
     public void configure( Configuration conf )
         throws ConfigurationException

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message