From 9d690194a88200c47b3a1d7ed64efe5890c2943b Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Wed, 15 Nov 2006 16:25:47 +0000
Subject: [PATCH] Update the password policy implementation to use ds-pwp-password-policy-dn instead of pwdPolicySubentry for indicating which password policy should be applied for a given user.  The new attribute is not marked NO-USER-MODIFICATION so that it can be directly altered by administrators in addition to having a value populated by a virtual attribute.  The pwdPolicySubentry attribute is defined in the IETF draft as NO-USER-MODIFICATION and is only intended to be virtually defined, making it more difficult to configure a special policy for an individual user.

---
 opends/resource/schema/02-config.ldif                                                                               |    3 +
 opends/tests/unit-tests-testng/src/server/org/opends/server/core/AddOperationTestCase.java                          |    2 
 opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java |    2 
 opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandlerTestCase.java   |   10 ++--
 opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java                          |    4 +-
 opends/resource/config/config.ldif                                                                                  |    4 +-
 opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java            |   24 ++++++------
 opends/src/server/org/opends/server/messages/CoreMessages.java                                                      |    4 +-
 opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPModifyTestCase.java                           |    4 +-
 opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandlerTestCase.java     |   10 ++--
 opends/src/server/org/opends/server/core/PasswordPolicyState.java                                                   |   10 +---
 opends/src/server/org/opends/server/core/AddOperation.java                                                          |    2 
 opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/PasswordPolicyImportPluginTestCase.java         |    6 +-
 opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java                           |    4 +-
 opends/tests/unit-tests-testng/src/server/org/opends/server/api/PasswordValidatorTestCase.java                      |   16 ++++----
 opends/src/server/org/opends/server/config/ConfigConstants.java                                                     |   13 +-----
 16 files changed, 54 insertions(+), 64 deletions(-)

diff --git a/opends/resource/config/config.ldif b/opends/resource/config/config.ldif
index e5e89f5..5657997 100644
--- a/opends/resource/config/config.ldif
+++ b/opends/resource/config/config.ldif
@@ -854,7 +854,7 @@
 objectClass: ds-cfg-password-policy
 cn: Root Password Policy
 ds-cfg-password-attribute: userPassword
-ds-cfg-default-password-storage-scheme: SSHA512
+ds-cfg-default-password-storage-scheme: SSHA
 ds-cfg-allow-expired-password-changes: false
 ds-cfg-allow-multiple-password-values: false
 ds-cfg-allow-pre-encoded-passwords: false
@@ -1030,7 +1030,7 @@
 ds-rlim-size-limit: 0
 ds-rlim-time-limit: 0
 ds-rlim-lookthrough-limit: 0
-pwdPolicySubentry: cn=Root Password Policy,cn=Password Policies,cn=config
+ds-pwp-password-policy-dn: cn=Root Password Policy,cn=Password Policies,cn=config
 
 dn: cn=Root DSE,cn=config
 objectClass: top
diff --git a/opends/resource/schema/02-config.ldif b/opends/resource/schema/02-config.ldif
index 8c8f7ce..cc342dc 100644
--- a/opends/resource/schema/02-config.ldif
+++ b/opends/resource/schema/02-config.ldif
@@ -988,6 +988,9 @@
 attributeTypes: ( 1.3.6.1.4.1.26027.1.1.287 NAME 'ds-cfg-backend-mode'
   SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE
   X-ORIGIN 'OpenDS Directory Server' )
+attributeTypes: ( 1.3.6.1.4.1.26027.1.1.288 NAME 'ds-pwp-password-policy-dn'
+  SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 USAGE directoryOperation
+  X-ORIGIN 'OpenDS Directory Server' )
 objectClasses: ( 1.3.6.1.4.1.26027.1.2.1
   NAME 'ds-cfg-access-control-handler' SUP top STRUCTURAL
   MUST ( cn $ ds-cfg-acl-handler-class $ ds-cfg-acl-handler-enabled )
diff --git a/opends/src/server/org/opends/server/config/ConfigConstants.java b/opends/src/server/org/opends/server/config/ConfigConstants.java
index 23acae5..618fc78 100644
--- a/opends/src/server/org/opends/server/config/ConfigConstants.java
+++ b/opends/src/server/org/opends/server/config/ConfigConstants.java
@@ -3176,17 +3176,8 @@
    * The name of the operational attribute that will appear in a user's entry to
    * indicate which password policy should be used.
    */
-  public static final String OP_ATTR_PWPOLICY_SUBENTRY =
-       "pwdPolicySubentry";
-
-
-
-  /**
-   * The name of the password policy subentry attribute, in all lowercase
-   * characters.
-   */
-  public static final String OP_ATTR_PWPOLICY_SUBENTRY_LC =
-       "pwdpolicysubentry";
+  public static final String OP_ATTR_PWPOLICY_POLICY_DN =
+       "ds-pwp-password-policy-dn";
 
 
 
diff --git a/opends/src/server/org/opends/server/core/AddOperation.java b/opends/src/server/org/opends/server/core/AddOperation.java
index 960f90b..fdc2f56 100644
--- a/opends/src/server/org/opends/server/core/AddOperation.java
+++ b/opends/src/server/org/opends/server/core/AddOperation.java
@@ -1408,7 +1408,7 @@
           //          attribute.
           PasswordPolicy pwPolicy = null;
           List<Attribute> pwAttrList =
-               entry.getAttribute(OP_ATTR_PWPOLICY_SUBENTRY_LC);
+               entry.getAttribute(OP_ATTR_PWPOLICY_POLICY_DN);
           if ((pwAttrList != null) && (! pwAttrList.isEmpty()))
           {
             Attribute a = pwAttrList.get(0);
diff --git a/opends/src/server/org/opends/server/core/PasswordPolicyState.java b/opends/src/server/org/opends/server/core/PasswordPolicyState.java
index 43583d2..6c2008f 100644
--- a/opends/src/server/org/opends/server/core/PasswordPolicyState.java
+++ b/opends/src/server/org/opends/server/core/PasswordPolicyState.java
@@ -298,14 +298,10 @@
     assert debugEnter(CLASS_NAME, "getPasswordPolicy");
 
 
-    // See if the user entry contains the pwdPolicySubentry attribute to select
-    // a custom objectclass (whether real or virtual).
+    // See if the user entry contains the ds-pwp-password-policy-dn attribute to
+    // select a custom objectclass (whether real or virtual).
     AttributeType type =
-         DirectoryServer.getAttributeType(OP_ATTR_PWPOLICY_SUBENTRY_LC);
-    if (type == null)
-    {
-      type = DirectoryServer.getDefaultAttributeType(OP_ATTR_PWPOLICY_SUBENTRY);
-    }
+         DirectoryServer.getAttributeType(OP_ATTR_PWPOLICY_POLICY_DN, true);
 
     List<Attribute> attrList = userEntry.getAttribute(type);
     if ((attrList == null) || attrList.isEmpty())
diff --git a/opends/src/server/org/opends/server/messages/CoreMessages.java b/opends/src/server/org/opends/server/messages/CoreMessages.java
index abc7cd0..0a2a77a 100644
--- a/opends/src/server/org/opends/server/messages/CoreMessages.java
+++ b/opends/src/server/org/opends/server/messages/CoreMessages.java
@@ -7945,8 +7945,8 @@
 
     registerMessage(MSGID_PWPSTATE_CANNOT_DECODE_SUBENTRY_VALUE_AS_DN,
                     "An error occurred while attempting to decode the " +
-                    OP_ATTR_PWPOLICY_SUBENTRY + " value \"%s\" in user entry " +
-                    "\"%s\" as a DN:  %s.");
+                    OP_ATTR_PWPOLICY_POLICY_DN + " value \"%s\" in user " +
+                    "entry \"%s\" as a DN:  %s.");
     registerMessage(MSGID_PWPSTATE_NO_SUCH_POLICY,
                     "User entry %s is configured to use a password policy " +
                     "subentry of %s but no such password policy has been " +
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/api/PasswordValidatorTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/api/PasswordValidatorTestCase.java
index 140fdff..e29f383 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/api/PasswordValidatorTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/api/PasswordValidatorTestCase.java
@@ -355,8 +355,8 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy,cn=Password " +
-              "Policies,cn=config");
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
+              "cn=Password Policies,cn=config");
 
 
     InternalClientConnection conn =
@@ -416,8 +416,8 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy,cn=Password " +
-              "Policies,cn=config");
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
+              "cn=Password Policies,cn=config");
 
 
     InternalClientConnection conn =
@@ -721,8 +721,8 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy,cn=Password " +
-              "Policies,cn=config");
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
+              "cn=Password Policies,cn=config");
 
 
     InternalClientConnection conn =
@@ -804,8 +804,8 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy,cn=Password " +
-              "Policies,cn=config");
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
+              "cn=Password Policies,cn=config");
 
 
     InternalClientConnection conn =
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/core/AddOperationTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/core/AddOperationTestCase.java
index 4f0e9ca..a523cf8 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/core/AddOperationTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/core/AddOperationTestCase.java
@@ -931,7 +931,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandlerTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandlerTestCase.java
index c46c4d0..137cc07 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandlerTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandlerTestCase.java
@@ -209,7 +209,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -258,7 +258,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -310,7 +310,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: " + password,
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -359,7 +359,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -408,7 +408,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandlerTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandlerTestCase.java
index 3b5429d..238624a 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandlerTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandlerTestCase.java
@@ -210,7 +210,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -261,7 +261,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -312,7 +312,7 @@
               "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -363,7 +363,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -778,7 +778,7 @@
          "cn: Second Root DN",
          "ds-cfg-alternate-bind-dn: cn=Second Root DN",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java
index 03bbdfa..763b17b 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/extensions/PasswordModifyExtendedOperationTestCase.java
@@ -2378,7 +2378,7 @@
          "cn: Test User",
          "authPassword: password",
          "authPassword: password2",
-         "pwdPolicySubentry: cn=SHA1 AuthPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=SHA1 AuthPassword Policy," +
               "cn=Password Policies,cn=config");
 
 
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/PasswordPolicyImportPluginTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/PasswordPolicyImportPluginTestCase.java
index dfab7eb..212d3ca 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/PasswordPolicyImportPluginTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/plugins/PasswordPolicyImportPluginTestCase.java
@@ -273,7 +273,7 @@
       "sn: User2",
       "cn: Test User2",
       "userPassword: password",
-      "pwdPolicySubentry: cn=SSHA512 UserPassword Policy," +
+      "ds-pwp-password-policy-dn: cn=SSHA512 UserPassword Policy," +
            "cn=Password Policies,cn=config",
       "",
       "dn: uid=test.user3,o=test",
@@ -287,8 +287,8 @@
       "sn: User3",
       "cn: Test User3",
       "authPassword: password",
-      "pwdPolicySubentry: cn=SHA1 AuthPassword Policy,cn=Password Policies," +
-           "cn=config"
+      "ds-pwp-password-policy-dn: cn=SHA1 AuthPassword Policy," +
+           "cn=Password Policies,cn=config"
     };
 
     String ldifString = TestCaseUtils.makeLdif(entryLines);
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java
index 10434d5..377c0ab 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPAuthenticationHandlerTestCase.java
@@ -727,7 +727,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -799,7 +799,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -947,7 +947,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -1248,7 +1248,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -1310,7 +1310,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -1387,7 +1387,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -1451,7 +1451,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -1767,7 +1767,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -2244,7 +2244,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -2385,7 +2385,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -4063,7 +4063,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -4125,7 +4125,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java
index da03e95..52d9dc7 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPCompareTestCase.java
@@ -709,7 +709,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -758,7 +758,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPModifyTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPModifyTestCase.java
index 6641dd9..0eb0858 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPModifyTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPModifyTestCase.java
@@ -634,7 +634,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -682,7 +682,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java
index 99a22f2..3672f92 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDAPSearchTestCase.java
@@ -789,7 +789,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =
@@ -839,7 +839,7 @@
          "sn: User",
          "cn: Test User",
          "userPassword: password",
-         "pwdPolicySubentry: cn=Clear UserPassword Policy," +
+         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
               "cn=Password Policies,cn=config");
 
     InternalClientConnection conn =

--
Gitblit v1.10.0