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
(This used to be commit bf7166e785e5c5d52dbb0c12e5e4206d74e72f4e)

source4/lib/ldb/modules/rdn_name.c

index c4de8e8da8b376ee5dd4f1127c3962d76e543db6..65c044c0f4127c2ef0cf230854904adbc69660e2 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;
                }
        }