mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
05.10.2007 0b70ce2d76ab45434692e5ef02b44eeb1f3b69a1
Update the internal root connection to ensure that it always inherits a
default set of privileges, even if the administrator has taken those
privileges out of the set granted to other root users by default. The
privileges that will always be granted to the internal root connection
include:

- bypass-acl
- modify-acl
- config-read
- config-write
- ldif-import
- ldif-export
- backend-backup
- backend-restore
- server-shutdown
- server-restart
- disconnect-client
- cancel-request
- password-reset
- update-schema
- privilege-change
- unindexed-search

OpenDS Issue Number: 1808
1 files modified
19 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java 19 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
@@ -57,6 +57,7 @@
import org.opends.server.types.AbstractOperation;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.AuthenticationInfo;
import org.opends.server.types.ByteString;
import org.opends.server.types.CancelRequest;
@@ -75,6 +76,7 @@
import org.opends.server.types.Modification;
import org.opends.server.types.ObjectClass;
import org.opends.server.types.Operation;
import org.opends.server.types.Privilege;
import org.opends.server.types.RDN;
import org.opends.server.types.RawAttribute;
import org.opends.server.types.RawFilter;
@@ -202,6 +204,23 @@
      LinkedHashMap<AttributeType,List<Attribute>> operationalAttrs =
           new LinkedHashMap<AttributeType,List<Attribute>>();
      AttributeType privType =
           DirectoryServer.getAttributeType(OP_ATTR_PRIVILEGE_NAME,
                                            true);
      LinkedHashSet<AttributeValue> values =
           new LinkedHashSet<AttributeValue>();
      for (Privilege p : Privilege.getDefaultRootPrivileges())
      {
        values.add(new AttributeValue(privType, p.getName()));
      }
      Attribute privAttr =
           new Attribute(privType, OP_ATTR_PRIVILEGE_NAME, values);
      attrList = new LinkedList<Attribute>();
      attrList.add(privAttr);
      operationalAttrs.put(privType, attrList);
      DN internalUserDN = DN.decode(fullDNString);
      Entry internalUserEntry =