]> git.sur5r.net Git - openldap/commitdiff
fix back-ldif delete (ITS#5265)
authorPierangelo Masarati <ando@openldap.org>
Tue, 11 Dec 2007 15:12:48 +0000 (15:12 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 11 Dec 2007 15:12:48 +0000 (15:12 +0000)
servers/slapd/back-ldif/ldif.c

index 76427a99c5e36e76cb881f5aae3a213418a36218..21da29b4bea038eacd6233a9340d6e5fb050a976 100644 (file)
@@ -1023,15 +1023,17 @@ static int ldif_back_delete(Operation *op, SlapReply *rs) {
                        break;
 
                case ENOENT:
-                       rs->sr_err = LDAP_NO_SUCH_OBJECT;
+                       /* is leaf, go on */
+                       res = 0;
                        break;
 
                default:
                        rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
                        break;
                }
+       }
 
-       } else {
+       if ( !res ) {
                res = unlink(path.bv_val);
                if ( res == -1 ) {
                        switch ( errno ) {