Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

5.209 ValidateDRSInput

procedure ValidateDRSInput(hDrs: DRS_HANDLE, opnum: integer)

Informative summary of behavior: The ValidateDRSInput procedure performs certain checks based on the input and throws an exception, if needed.

if opnum = 0 then
  return
endif

if (hDrs = null) then
  raise ERROR_INVALID_HANDLE exception
endif

if (ClientUUID(hDrs) ≠ NTDSAPI_CLIENT_GUID) and
   (IsServerExtensionsChanged(ServerExtensions(hDrs)) and 
   opnum ≠ 1
then
   raise ERROR_DS_DRS_EXTENSIONS_CHANGED exception
endif

if (ClientUUID(hDrs) ≠ NTDSAPI_CLIENT_GUID) and
   (ClientExtensions(hDrs).dwReplEpoch ≠  DSAObj()!msDS-ReplicationEpoch)  and 
   opnum ≠ 1 
then
   raise ERROR_DS_DIFFERENT_REPL_EPOCHS exception
endif

if IsAdlds() and 
   (opnum = 9 or    /*IDL_DRSGetMemberships*/
    opnum = 10 or   /*IDL_DRSInterDomainMove*/
    opnum = 11 or   /*IDL_DRSGetNT4ChangeLog*/
    opnum = 13 or   /*IDL_DRSWriteSPN*/
    opnum = 15 or   /*IDL_DRSRemoveDsDomain*/
    opnum = 16 or   /*IDL_DRSDomainControllerInfo*/ 
    opnum = 20 or   /*IDL_DRSAddSidHistory*/ 
    opnum = 21 or   /*IDL_DRSGetMemberships2*/
    opnum = 24      /*IDL_DRSQuerySitesByCost*/)
then
  raise ERROR_INVALID_PARAMETER exception
endif

if AmIRODC() and
   (opnum = 3 or    /*IDL_DRSGetNCChanges*/
    opnum = 10 or   /*IDL_DRSInterDomainMove*/
    opnum = 11 or   /*IDL_DRSGetNT4ChangeLog*/
    opnum = 14 or   /*IDL_DRSRemoveDsServer*/
    opnum = 15 or   /*IDL_DRSRemoveDsDomain*/
    opnum = 17 or   /*IDL_DRSAddEntry*/
    opnum = 20      /*IDL_DRSAddSidHistory*/)
then
   raise ERROR_INVALID_PARAMETER exception
endif

ValidateDRSDemotionInput(hDrs, opnum)

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.