User: starksm 
  Date: 01/05/24 18:03:49

  Modified:    src/main/org/jboss Main.java
  Log:
  The JAAS login config file URL should be determined by querying the
  class loader for confName/auth.conf, not from the jboss.properties file.
  
  Revision  Changes    Path
  1.33      +17 -1     jboss/src/main/org/jboss/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/Main.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Main.java 2001/04/14 22:14:14     1.32
  +++ Main.java 2001/05/25 01:03:49     1.33
  @@ -31,7 +31,8 @@
    *   @see <related>
    *   @author Rickard Öberg ([EMAIL PROTECTED])
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Daniel O'Connor</a>.
  - *   @version $Revision: 1.32 $
  + *   @author [EMAIL PROTECTED]
  + *   @version $Revision: 1.33 $
    */
   public class Main
   {
  @@ -79,6 +80,21 @@
             System.setProperty("jboss.home", homeDir.getCanonicalPath());
         }
         System.out.println("jboss.home = "+System.getProperty("jboss.home"));
  +
  +      // Set the JAAS login config file if not already set
  +      if( System.getProperty("java.security.auth.login.config") == null )
  +      {
  +          URL loginConfig = 
Main.class.getClassLoader().getResource(confName+"/auth.conf");
  +          if( loginConfig != null )
  +          {
  +              System.getProperty("java.security.auth.login.config", 
loginConfig.toExternalForm());
  +              System.out.println("Using JAAS LoginConfig: 
"+loginConfig.toExternalForm());
  +          }
  +          else
  +          {
  +              System.out.println("Warning: no auth.conf found in config="+confName);
  +          }
  +      }
   
         // Set security
         URL serverPolicy = 
Main.class.getClassLoader().getResource(confName+"/server.policy");
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to