s4/drs:kccdrs_replica_get_info_obj_metadata implementation
[abartlet/samba.git/.git] / source4 / torture / rpc / dsgetinfo.c
index 7aad7a16d048ddf34cab68340fafd612022afacb..418f5b45305e93b0188ec6b175e6db46e3f749c1 100644 (file)
@@ -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;
@@ -223,19 +224,19 @@ static bool test_getinfo(struct torture_context *tctx,
                        NULL
                },{
                        DRSUAPI_DS_REPLICA_GET_INFO2,
-                       DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02,
+                       DRSUAPI_DS_REPLICA_INFO_REPSTO,
                        NULL
                },{
                        DRSUAPI_DS_REPLICA_GET_INFO2,
-                       DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04,
+                       DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS,
                        "__IGNORED__"
                },{
                        DRSUAPI_DS_REPLICA_GET_INFO2,
-                       DRSUAPI_DS_REPLICA_INFO_CURSORS05,
+                       DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1,
                        NULL
                },{
                        DRSUAPI_DS_REPLICA_GET_INFO2,
-                       DRSUAPI_DS_REPLICA_INFO_06,
+                       DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS,
                        NULL
                }
        };
@@ -267,10 +268,10 @@ static bool test_getinfo(struct torture_context *tctx,
                        r.in.req->req2.info_type        = array[i].infotype;
                        r.in.req->req2.object_dn        = object_dn;
                        ZERO_STRUCT(r.in.req->req2.guid1);
-                       r.in.req->req2.unknown1 = 0;
+                       r.in.req->req2.flags    = 0;
                        r.in.req->req2.string1  = NULL;
                        r.in.req->req2.string2  = NULL;
-                       r.in.req->req2.unknown2 = 0;
+                       r.in.req->req2.enumeration_context = 0;
                        break;
                }
 
@@ -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;