]> git.sur5r.net Git - openldap/commitdiff
controls can always have criticality set to FALSE (ITS#5785)
authorPierangelo Masarati <ando@openldap.org>
Sun, 2 Nov 2008 21:06:50 +0000 (21:06 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 2 Nov 2008 21:06:50 +0000 (21:06 +0000)
servers/slapd/controls.c

index 496524f10a87961bd74732a2ce5c455224551813..ee2a36742f91aca599ebb4f9e732a257f23d11c5 100644 (file)
@@ -960,12 +960,10 @@ static int parseDontUseCopy (
                return LDAP_PROTOCOL_ERROR;
        }
 
-       if ( !ctrl->ldctl_iscritical ) {
-               rs->sr_text = "dontUseCopy criticality of FALSE not allowed";
-               return LDAP_PROTOCOL_ERROR;
-       }
+       op->o_dontUseCopy = ctrl->ldctl_iscritical
+               ? SLAP_CONTROL_CRITICAL
+               : SLAP_CONTROL_NONCRITICAL;
 
-       op->o_dontUseCopy = SLAP_CONTROL_CRITICAL;
        return LDAP_SUCCESS;
 }