Fix rdn_name errors.
authorAndrew Bartlett <abartlet@samba.org>
Wed, 27 Feb 2008 21:38:53 +0000 (08:38 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 27 Feb 2008 21:38:53 +0000 (08:38 +1100)
Return the correct error when the DN is mismatched with it's RDN
attribute (now matches AD).

Andrew Bartlett

source/lib/ldb/modules/rdn_name.c

index c4de8e8..65c044c 100644 (file)
@@ -119,7 +119,8 @@ static int rdn_name_add(struct ldb_module *module, struct ldb_request *req)
                                      "RDN mismatch on %s: %s (%s)", 
                                      ldb_dn_get_linearized(msg->dn), rdn_name, rdn_val.data);
                        talloc_free(down_req);
-                       return LDB_ERR_OPERATIONS_ERROR;
+                       /* Match AD's error here */
+                       return LDB_ERR_INVALID_DN_SYNTAX;
                }
        }