You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/06/29 15:09:21 UTC
svn commit: r202366 -
/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryService.java
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." );