[jboss-cvs] Picketbox SVN: r151 - trunk/picketbox/src/main/java/org/picketbox/factories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jan 12 10:56:14 EST 2011


Author: anil.saldhana at jboss.com
Date: 2011-01-12 10:56:14 -0500 (Wed, 12 Jan 2011)
New Revision: 151

Modified:
   trunk/picketbox/src/main/java/org/picketbox/factories/SecurityFactory.java
Log:
SECURITY-549: check for sys prop or auth.conf

Modified: trunk/picketbox/src/main/java/org/picketbox/factories/SecurityFactory.java
===================================================================
--- trunk/picketbox/src/main/java/org/picketbox/factories/SecurityFactory.java	2011-01-12 15:35:14 UTC (rev 150)
+++ trunk/picketbox/src/main/java/org/picketbox/factories/SecurityFactory.java	2011-01-12 15:56:14 UTC (rev 151)
@@ -59,7 +59,12 @@
          URL configLocation = tcl.getResource("auth.conf");
          String prop = "java.security.auth.login.config";
          if(SecurityActions.getSystemProperty(prop, null) == null)
-            SecurityActions.setSystemProperty(prop, configLocation.toExternalForm());
+         {
+            if( configLocation == null )
+               throw new RuntimeException( "Neither system property *java.security.auth.login.config* available or auth.conf present" );
+
+            SecurityActions.setSystemProperty(prop, configLocation.toExternalForm());  
+         }
          
          parentConfiguration = Configuration.getConfiguration();
       }



More information about the jboss-cvs-commits mailing list