]> git.sur5r.net Git - openldap/commitdiff
don't accept modify operations with no modifications (ITS#4183)
authorPierangelo Masarati <ando@openldap.org>
Thu, 17 Nov 2005 22:45:32 +0000 (22:45 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 17 Nov 2005 22:45:32 +0000 (22:45 +0000)
servers/slapd/modify.c

index 90c7d3c3a0901f60388365b006b26d5ae7511f27..c4e35be7aa2474b7a1fb0c6ad5a7dc3990d41c13 100644 (file)
@@ -169,6 +169,14 @@ do_modify(
        }
        *modtail = NULL;
 
+       if ( modlist == NULL ) {
+               Debug( LDAP_DEBUG_ANY, "do_modify: no modifications\n", 0, 0, 0 );
+               send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
+                       "empty change secquence in modify operation" );
+
+               goto cleanup;
+       }
+
        if( get_ctrls( op, rs, 1 ) != LDAP_SUCCESS ) {
                Debug( LDAP_DEBUG_ANY, "do_modify: get_ctrls failed\n", 0, 0, 0 );