
| Key: |
DIRSERVER-652
|
| Type: |
Improvement
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Emmanuel Lecharny
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
23/Aug/06 12:33 PM
|
|
After having profiled the server, I found that the LdapDN<init>(Name) has been called 3000 times, because the LdapPrincipal contains a Name instead of a LdapDN element.
We should check that the passed Name is not an instance of LdapDN before calling new LdapDN( Name) in
org.apache.directory.server.core.authz.DefaultAuthorizationService.protectLookUp() method
:
...
LdapDN principalDn = new LdapDN( ( ( ServerContext ) ctx ).getPrincipal().getJndiName() );
...
could be :
Name name = ( ( ServerContext ) ctx ).getPrincipal().getJndiName() ;
LdapDN principalDn= ( name instanceof LdapDN ? name.clone() : new LdapDN( name ) );
|
|
Description
|
After having profiled the server, I found that the LdapDN<init>(Name) has been called 3000 times, because the LdapPrincipal contains a Name instead of a LdapDN element.
We should check that the passed Name is not an instance of LdapDN before calling new LdapDN( Name) in
org.apache.directory.server.core.authz.DefaultAuthorizationService.protectLookUp() method
:
...
LdapDN principalDn = new LdapDN( ( ( ServerContext ) ctx ).getPrincipal().getJndiName() );
...
could be :
Name name = ( ( ServerContext ) ctx ).getPrincipal().getJndiName() ;
LdapDN principalDn= ( name instanceof LdapDN ? name.clone() : new LdapDN( name ) );
|
Show » |
| No work has yet been logged on this issue.
|
|