Ejemplo n.º 1
0
        public DRS_MSG_REVMEMB_REQ CreateDrsGetMembershipsV1Request()
        {
            DRS_MSG_REVMEMB_REQ req = new DRS_MSG_REVMEMB_REQ();

            req.V1                 = new DRS_MSG_REVMEMB_REQ_V1();
            req.V1.cDsNames        = 1;
            req.V1.ppDsNames       = new DSNAME[1][];
            req.V1.ppDsNames[0]    = new DSNAME[] { DrsuapiClient.CreateDsName(null, Guid.Empty, null) };
            req.V1.pLimitingDomain = null;
            req.V1.OperationType   = REVERSE_MEMBERSHIP_OPERATION_TYPE.GroupMembersTransitive;

            return(req);
        }
Ejemplo n.º 2
0
        public void DRSR_DRSGetMemberships_Access_Denied()
        {
            DrsrTestChecker.Check();
            uint ret = drsTestClient.DrsBind(
                EnvironmentConfig.Machine.WritableDC1,
                EnvironmentConfig.User.ParentDomainUser,
                DRS_EXTENSIONS_IN_FLAGS.DRS_EXT_BASE);
            /* comments from TD */

            /*
             * if not AccessCheckCAR(DefaultNC(), DS-Replication-Get-Changes) then
             * return ERROR_DS_DRA_ACCESS_DENIED
             * endif
             *
             */

            /* comments from likezh */

            /*
             * not AccessCheckCAR(DefaultNC(), DS-Replication-Get-Changes)
             */
            //throw new NotImplementedException();

            /* Create request message */
            DRS_MSG_REVMEMB_REQ msgIn = drsTestClient.CreateDrsGetMembershipsV1Request();

            uint dwInVersion  = 1;
            uint?dwOutVersion = 0;
            DRS_MSG_REVMEMB_REPLY?reply;

            /* Issue the request */
            ret = drsTestClient.DRSClient.DrsGetMemberships(
                EnvironmentConfig.DrsContextStore[EnvironmentConfig.Machine.WritableDC1],
                dwInVersion,
                msgIn,
                out dwOutVersion,
                out reply);
            BaseTestSite.Assert.AreEqual <uint>(
                (uint)Win32ErrorCode_32.ERROR_DS_DRA_ACCESS_DENIED,
                ret,
                "DrsGetMemberships: return code mismatch."
                );
        }