3.1.3.1 Mode Initialization
Any implementation of the RPC Location Services Protocol Extensions MUST determine its mode using the following algorithm:
The locator determines whether the computer is joined to a domain. If the computer is not joined to a domain, the locator MUST set its mode to nondirectory mode. If the computer is joined to a domain, the locator issues an LDAP query to retrieve the nameServiceFlags attribute of the Active Directory RPC services container. Information from Active Directory MUST be queried in the context of the security principal of the computer.
If the attribute is not retrieved successfully, the locator MUST set its mode to nondirectory mode.<5>
If the attribute is retrieved successfully and is unspecified or specifies a nonzero value, the locator MUST set its mode to directory mode.<6>
Otherwise, if the attribute is retrieved successfully and is specified as zero, the locator MUST set its mode to Directory-only.