다음을 통해 공유


3.1.5.11.1 SamrLookupDomainInSamServer (Opnum 5)

The SamrLookupDomainInSamServer method obtains the SID of a domain object, given the object's name.

 long SamrLookupDomainInSamServer(
   [in] SAMPR_HANDLE ServerHandle,
   [in] PRPC_UNICODE_STRING Name,
   [out] PRPC_SID* DomainId
 );

ServerHandle: An RPC context handle, as specified in section 2.2.7.2, representing a server object.

Name: A UTF-16 encoded string.

DomainId: A SID value of a domain that corresponds to the Name passed in. The match MUST be exact (no wildcard characters are permitted). See message processing later in this section for more details.

This protocol asks the RPC runtime, via the strict_context_handle attribute, to reject the use of context handles created by a method of a different RPC interface than this one, as specified in [MS-RPCE] section 3.

Upon receiving this message, the server MUST process the data from the message subject to the following constraints:

  1. The server MUST return an error if ServerHandle.HandleType is not equal to "Server".

  2. ServerHandle.GrantedAccess MUST have the required access specified in section 3.1.2.2. Otherwise, the server MUST return STATUS_ACCESS_DENIED.

  3. If the Name input parameter matches an attribute value as shown in the following table, the associated value in the "Return attribute" column MUST be returned via the DomainId parameter.

    Matching object

    Matching attribute

    Return object

    Return attribute

    domain object

    name

    domain object

    objectSid

    built-in object

    name

    built-in object

    objectSid

  4. If there is no match, an error MUST be returned.