s4:torture - fix up "ldap_basic" test
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Wed, 14 Oct 2009 08:50:57 +0000 (10:50 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Wed, 14 Oct 2009 08:50:57 +0000 (10:50 +0200)
source4/torture/ldap/basic.c

index c2a26f81b8cdce3cbb7b2ce3993a16c171a96bff..a9d9ea083282b204593dfacd78a6218380630abc 100644 (file)
@@ -213,7 +213,8 @@ static bool test_error_codes(struct torture_context *tctx,
 {
        struct ldap_message *msg, *rep;
        struct ldap_request *req;
-       char *err_code_str, *endptr;
+       const char *err_code_str;
+       char *endptr;
        WERROR err;
        NTSTATUS status;
 
@@ -263,8 +264,8 @@ static bool test_error_codes(struct torture_context *tctx,
                        return false;
                }
        } else {
-               if ((!W_ERROR_EQUAL(err, WERR_DS_GENERIC_ERROR))
-                       || (rep->r.AddResponse.resultcode != 80)) {
+               if ((!W_ERROR_EQUAL(err, WERR_DS_OBJ_CLASS_VIOLATION))
+                       || (rep->r.AddResponse.resultcode != 65)) {
                        return false;
                }
        }
@@ -304,8 +305,8 @@ static bool test_error_codes(struct torture_context *tctx,
                        return false;
                }
        } else {
-               if ((!W_ERROR_EQUAL(err, WERR_DS_GENERIC_ERROR))
-                       || (rep->r.ModifyResponse.resultcode != 80)) {
+               if ((!W_ERROR_EQUAL(err, WERR_DS_OPERATIONS_ERROR))
+                       || (rep->r.ModifyResponse.resultcode != 1)) {
                        return false;
                }
        }