From 23d1dd5189e0662efb532c31b26c71434a00cff4 Mon Sep 17 00:00:00 2001 From: Erick Nogueira do Nascimento Date: Thu, 11 Feb 2010 19:04:00 -0200 Subject: s4-drs: DsGetReplInfo() refactoring --- source4/torture/rpc/dsgetinfo.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/dsgetinfo.c b/source4/torture/rpc/dsgetinfo.c index acad1a0916..03bda7e70e 100644 --- a/source4/torture/rpc/dsgetinfo.c +++ b/source4/torture/rpc/dsgetinfo.c @@ -172,6 +172,7 @@ static bool test_getinfo(struct torture_context *tctx, union drsuapi_DsReplicaInfo info; enum drsuapi_DsReplicaInfoType info_type; int i; + int invalid_levels = 0; struct { int32_t level; int32_t infotype; @@ -278,14 +279,24 @@ static bool test_getinfo(struct torture_context *tctx, r.out.info_type = &info_type; status = dcerpc_drsuapi_DsReplicaGetInfo(p, tctx, &r); - torture_drsuapi_assert_call(tctx, p, status, &r, "dcerpc_drsuapi_DsReplicaGetInfo"); - if (!NT_STATUS_IS_OK(status) && p->last_fault_code == DCERPC_FAULT_INVALID_TAG) { + + if (W_ERROR_EQUAL(r.out.result, WERR_INVALID_LEVEL)) { + /* this is a not yet supported level */ + torture_comment(tctx, + "DsReplicaGetInfo level %d and/or infotype %d not yet supported by server\n", + array[i].level, array[i].infotype); + invalid_levels++; + } else if (!NT_STATUS_IS_OK(status) && p->last_fault_code == DCERPC_FAULT_INVALID_TAG) { torture_comment(tctx, "DsReplicaGetInfo level %d and/or infotype %d not supported by server\n", array[i].level, array[i].infotype); - } else { + }/* else { torture_drsuapi_assert_call(tctx, p, status, &r, "dcerpc_drsuapi_DsReplicaGetInfo"); - } + }*/ + } + + if (invalid_levels > 0) { + return false; } return true; -- cgit