]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#6830 Enable NO-USER-MODIFICATION on ppolicy attributes
authorOndřej Kuzník <ondra@mistotebe.net>
Tue, 16 Mar 2021 12:29:55 +0000 (12:29 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 18 Mar 2021 17:32:30 +0000 (17:32 +0000)
servers/slapd/overlays/ppolicy.c
tests/scripts/test022-ppolicy

index 02567ea4c5d592c18a44b446dd5a531c6096d121..074619c4861273c258b11c343f4edf23cc945291 100644 (file)
@@ -143,7 +143,9 @@ static struct schema_info {
                "EQUALITY generalizedTimeMatch "
                "ORDERING generalizedTimeOrderingMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
-               "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )",
+               "SINGLE-VALUE "
+               "NO-USER-MODIFICATION "
+               "USAGE directoryOperation )",
                &ad_pwdChangedTime },
        {       "( 1.3.6.1.4.1.42.2.27.8.1.17 "
                "NAME ( 'pwdAccountLockedTime' ) "
@@ -152,10 +154,7 @@ static struct schema_info {
                "ORDERING generalizedTimeOrderingMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
                "SINGLE-VALUE "
-#if 0
-               /* Not until Relax control is released */
                "NO-USER-MODIFICATION "
-#endif
                "USAGE directoryOperation )",
                &ad_pwdAccountLockedTime },
        {       "( 1.3.6.1.4.1.42.2.27.8.1.19 "
@@ -164,28 +163,32 @@ static struct schema_info {
                "EQUALITY generalizedTimeMatch "
                "ORDERING generalizedTimeOrderingMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
-               "NO-USER-MODIFICATION USAGE directoryOperation )",
+               "NO-USER-MODIFICATION "
+               "USAGE directoryOperation )",
                &ad_pwdFailureTime },
        {       "( 1.3.6.1.4.1.42.2.27.8.1.20 "
                "NAME ( 'pwdHistory' ) "
                "DESC 'The history of users passwords' "
                "EQUALITY octetStringMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 "
-               "NO-USER-MODIFICATION USAGE directoryOperation )",
+               "NO-USER-MODIFICATION "
+               "USAGE directoryOperation )",
                &ad_pwdHistory },
        {       "( 1.3.6.1.4.1.42.2.27.8.1.21 "
                "NAME ( 'pwdGraceUseTime' ) "
                "DESC 'The timestamps of the grace login once the password has expired' "
                "EQUALITY generalizedTimeMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
-               "NO-USER-MODIFICATION USAGE directoryOperation )",
+               "NO-USER-MODIFICATION "
+               "USAGE directoryOperation )",
                &ad_pwdGraceUseTime }, 
        {       "( 1.3.6.1.4.1.42.2.27.8.1.22 "
                "NAME ( 'pwdReset' ) "
                "DESC 'The indication that the password has been reset' "
                "EQUALITY booleanMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 "
-               "SINGLE-VALUE USAGE directoryOperation )",
+               "SINGLE-VALUE "
+               "USAGE directoryOperation )",
                &ad_pwdReset },
        {       "( 1.3.6.1.4.1.42.2.27.8.1.23 "
                "NAME ( 'pwdPolicySubentry' ) "
@@ -193,10 +196,7 @@ static struct schema_info {
                "EQUALITY distinguishedNameMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 "
                "SINGLE-VALUE "
-#if 0
-               /* Not until Relax control is released */
                "NO-USER-MODIFICATION "
-#endif
                "USAGE directoryOperation )",
                &ad_pwdPolicySubentry },
        {       "( 1.3.6.1.4.1.42.2.27.8.1.27 "
@@ -205,7 +205,9 @@ static struct schema_info {
                "EQUALITY generalizedTimeMatch "
                "ORDERING generalizedTimeOrderingMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
-               "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )",
+               "SINGLE-VALUE "
+               "NO-USER-MODIFICATION "
+               "USAGE directoryOperation )",
                &ad_pwdStartTime },
        {       "( 1.3.6.1.4.1.42.2.27.8.1.28 "
                "NAME ( 'pwdEndTime' ) "
@@ -213,7 +215,9 @@ static struct schema_info {
                "EQUALITY generalizedTimeMatch "
                "ORDERING generalizedTimeOrderingMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
-               "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )",
+               "SINGLE-VALUE "
+               "NO-USER-MODIFICATION "
+               "USAGE directoryOperation )",
                &ad_pwdEndTime },
        /* Defined in schema_prep.c now
        {       "( 1.3.6.1.4.1.42.2.27.8.1.29 "
@@ -222,7 +226,9 @@ static struct schema_info {
                "EQUALITY generalizedTimeMatch "
                "ORDERING generalizedTimeOrderingMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
-               "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )",
+               "SINGLE-VALUE "
+               "NO-USER-MODIFICATION "
+               "USAGE directoryOperation )",
                &ad_pwdLastSuccess },
        */
        {       "( 1.3.6.1.4.1.42.2.27.8.1.33 "
@@ -232,10 +238,7 @@ static struct schema_info {
                "ORDERING generalizedTimeOrderingMatch "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
                "SINGLE-VALUE "
-#if 0
-               /* Not until Relax control is released */
                "NO-USER-MODIFICATION "
-#endif
                "USAGE directoryOperation )",
                &ad_pwdAccountTmpLockoutEnd },
 
index 87f0320a94c4b6002985801acc1bcf8e10e25731..34ee6308871c8acc3a15f0494280cc6e2208b45a 100755 (executable)
@@ -78,9 +78,8 @@ if test $RC = 0 ; then
 fi
 
 echo "Using ldapadd to populate the database..."
-# may need "-e relax" for draft 09, but not yet.
-$LDAPADD -D "$MANAGERDN" -H $URI1 -w $PASSWD < \
-       $LDIFPPOLICY >> $TESTOUT 2>&1
+$LDAPADD -D "$MANAGERDN" -H $URI1 -w $PASSWD -e '!relax' \
+       < $LDIFPPOLICY >> $TESTOUT 2>&1
 RC=$?
 if test $RC != 0 ; then
        echo "ldapadd failed ($RC)!"