<div class="content" name="SamrQuerySecurityObject" uuid="0ecf8fec-d17e-4a88-b7f1-e0f0f66790db"><p>The SamrQuerySecurityObject method queries the access
control on a server, <span><a href="7b2aeb27-92fc-41f6-8437-deb65d950921#gt_b0276eb2-4e65-4cf1-a718-e0920a614aca" data-linktype="relative-path">domain</a></span>, user, group,
or <span><a href="7b2aeb27-92fc-41f6-8437-deb65d950921#gt_0387e636-5654-4910-9519-1f8326cf5ec0" data-linktype="relative-path">alias
object</a></span>.</p><dl>
<dd>
<div><pre> long SamrQuerySecurityObject(
   [in] SAMPR_HANDLE ObjectHandle,
   [in] SECURITY_INFORMATION SecurityInformation,
   [out] PSAMPR_SR_SECURITY_DESCRIPTOR* SecurityDescriptor
 );
</pre></div>
</dd></dl><p><b>ObjectHandle: </b>An RPC context handle, as
specified in section <span><a href="8138c078-d881-4d1f-b378-94b4c34a287a" data-linktype="relative-path">2.2.7.2</a></span>,
representing a server, domain, user, group, or alias object.</p><p><b>SecurityInformation: </b>A bit field that
specifies which fields of <i>SecurityDescriptor</i> the client is requesting to
be returned.</p><dl>
<dd>
<p>The SECURITY_INFORMATION type is defined in <span><a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a></span>
section <span><a href="../ms-dtyp/23e75ca3-98fd-4396-84e5-86cd9d40d343" data-linktype="relative-path">2.4.7</a></span>.
The following bits are valid; all other bits MUST be zero when sent and ignored
on receipt.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>OWNER_SECURITY_INFORMATION 0x00000001</td>
  <td>If this bit is set, the client requests that the Owner member be returned. If this bit is not set, the client requests that the Owner member not be returned.</td>
 </tr><tr>
  <td>GROUP_SECURITY_INFORMATION 0x00000002</td>
  <td>If this bit is set, the client requests that the Group member be returned. If this bit is not set, the client requests that the Group member not be returned.</td>
 </tr><tr>
  <td>DACL_SECURITY_INFORMATION 0x00000004</td>
  <td>If this bit is set, the client requests that the DACL be returned. If this bit is not set, the client requests that the DACL not be returned.</td>
 </tr><tr>
  <td>SACL_SECURITY_INFORMATION 0x00000008</td>
  <td>If this bit is set, the client requests that the SACL be returned. If this bit is not set, the client requests that the SACL not be returned.</td>
 </tr></tbody></table>
</dd></dl><p><b>SecurityDescriptor: </b>A <span><a href="7b2aeb27-92fc-41f6-8437-deb65d950921#gt_e5213722-75a9-44e7-b026-8e4833f0d350" data-linktype="relative-path">security
descriptor</a></span> expressing accesses that are specific to the <i>ObjectHandle</i>
and the owner and group of the object. [MS-DTYP] section <span><a href="../ms-dtyp/7d4dac05-9cef-4563-a058-f108abecce1d" data-linktype="relative-path">2.4.6</a></span>
contains the specification for a valid security descriptor.</p><p>This protocol asks the RPC runtime, via the <b>strict_context_handle</b>
attribute, to reject the use of context handles created by a method of a
different RPC interface than this one, as specified in <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>
section <span><a href="../ms-rpce/38ae9f5a-dac2-46ad-b2b7-9c43f211d9f6" data-linktype="relative-path">3</a></span>.</p><p>Message processing for this method is specified in the
following two sections.</p></div>