RPC-DSSYNC: handle DCERPC_FAULT_OP_RNG_ERROR as not supported for DsGetNT4ChangeLog()
authorStefan Metzmacher <metze@samba.org>
Thu, 11 Mar 2010 14:11:29 +0000 (15:11 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 11 Mar 2010 14:13:52 +0000 (15:13 +0100)
metze

source4/torture/rpc/dssync.c

index aeb4f2a28265bbc1efd00fe1a3e62bc9af9cad2a..3918bdd24d6f10c8ad8a1d7deafcbd5e8b5a9ac6 100644 (file)
@@ -1022,7 +1022,11 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
                } else if (!NT_STATUS_IS_OK(status)) {
                        const char *errstr = nt_errstr(status);
                        if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
-                               errstr = dcerpc_errstr(ctx, ctx->new_dc.drsuapi.drs_pipe->last_fault_code);
+                               struct dcerpc_pipe *p = ctx->new_dc.drsuapi.drs_pipe;
+                               if (p->last_fault_code == DCERPC_FAULT_OP_RNG_ERROR) {
+                                       torture_skip(tctx, "DsGetNT4ChangeLog not supported by target server");
+                               }
+                               errstr = dcerpc_errstr(ctx, p->last_fault_code);
                        }
                        torture_fail(tctx,
                                     talloc_asprintf(tctx, "dcerpc_drsuapi_DsGetNT4ChangeLog failed - %s\n",