次の方法で共有


4.1.10.5.16 GetRoleScope

 procedure GetRoleScope(fsmoObj: DSName): set of DSName

Informative summary of behavior: The GetRoleScope procedure returns the set of objects in the FSMO role identified by the FSMO role object fsmoObj.

  
 scope: set of DSName
 partitionsFsmoObj: DSName
 schemaFsmoObj: DSName
 ridFsmoObj: DSName
 pdcFsmoObj: DSName
 c: DSName
 r: set of DSName
  
  
 partitionsFsmoObj := select one o from children ConfigNC() 
     where o!name = "Partitions"
 schemaFsmoObj := SchemaNC()
 infrastructureFsmoObj := select one o from children DefaultNC() 
     where o!name = "Infrastructure"
 ridFsmoObj := DefaultNC()!rIDManagerReference
  
  
 /* Scope always includes fsmoObj. For the PDC Emulation Role, scope
  * includes only fsmoObj. */
 scope := {fsmoObj}
  
  
 if fsmoObj = partitionsFsmoObj then
   /* Partition Naming Master Role: Add to scope the children of the
    * Partitions container. */
   r := select all o from children partitionsFsmoObj where true
   scope := scope + r
 else if fsmoObj = schemaFsmoObj then
   /* Schema Master Role: Set scope to all objects in the Schema
    * NC. */
   scope := select all o from subtree SchemaNC() where true
 else if fsmoObj = infrastructureFsmoObj then
   /* Infrastructure Master Role: Add to scope all objects in the
    * subtree rooted at CN=DomainUpdates,CN=System,DefaultNC(). */
   c := select one o from children DefaultNC() where o!name = "System"
   c := select one o from children c where o!name = "DomainUpdates"
   r := select all o from subtree c where true
   scope := scope + r
 else if fsmoObj = ridFsmoObj then
   /* RID Allocation Master Role: Add to scope all children of
    * CN=Infrastructure,DefaultNC() that are of class
    * infrastructureUpdate and have a value for the proxiedObjectName
    * attribute. */ 
   r := select all o from children-ts-included infrastructureFsmoObj 
       where infrastructureUpdate in o!objectClass and
         not o!proxiedObjectName = null
   scope := scope + r
 endif
  
  
 return scope