directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r202366 - /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
Date Wed, 29 Jun 2005 13:09:21 GMT
Author: trustin
Date: Wed Jun 29 06:09:21 2005
New Revision: 202366

URL: http://svn.apache.org/viewcvs?rev=202366&view=rev
Log:
Fixed: NullPointerEception in checkPermissionToCreateBootstrapEntries().

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java?rev=202366&r1=202365&r2=202366&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
Wed Jun 29 06:09:21 2005
@@ -466,8 +466,8 @@
     
     private void checkPermissionToCreateBootstrapEntries() throws NamingException
     {
-        if( !ContextPartitionNexus.ADMIN_PRINCIPAL.equals(
-                environment.get( Context.SECURITY_PRINCIPAL ).toString() ) )
+        String principal = ( String ) environment.get( Context.SECURITY_PRINCIPAL );
+        if( principal == null || !ContextPartitionNexus.ADMIN_PRINCIPAL.equals( principal
) )
         {
             throw new NoPermissionException(
                     "Only '" + ContextPartitionNexus.ADMIN_PRINCIPAL + "' can initiate the
first run." );



Mime
View raw message