This method gets security properties for a directory object specified by a directory service pathname.

 HRESULT S_DSGetObjectSecurity(
   [in] handle_t hBind,
   [in, range(1,58)] unsigned long dwObjectType,
   [in] const wchar_t* pwcsPathName,
   [in] unsigned long SecurityInformation,
   [out, size_is(nLength)] unsigned char* pSecurityDescriptor,
   [in, range(0,524288)] unsigned long nLength,
   [out] unsigned long* lpnLengthNeeded,
   [in] PCONTEXT_HANDLE_SERVER_AUTH_TYPE phServerAuth,
   [out, size_is(*pdwServerSignatureSize)] 
     unsigned char* pbServerSignature,
   [in, out] LPBOUNDED_SIGNATURE_SIZE pdwServerSignatureSize
 );

hBind:  MUST specify an RPC binding handle, as specified in [MS-RPCE] section 2.

dwObjectType:  Specifies the type of object for which security properties are to be retrieved. MUST be set to one of the object types defined in section 2.2.8.

pwcsPathName: Pointer to a NULL-terminated 16-bit Unicode string that MUST contain the directory service pathname, as specified in section 2.2.9, of the object in the directory service.

SecurityInformation: A bitwise mask of the information to be returned in the pSecurityDescriptor parameter. The bit fields are defined by the following table:

Value

Meaning

OWNER_SECURITY_INFORMATION

0x00000001

OWNER field from the security descriptor.

GROUP_SECURITY_INFORMATION

0x00000002

GROUP field from the security descriptor.

DACL_SECURITY_INFORMATION

0x00000004

Discretionary ACL field from the security descriptor.

SACL_SECURITY_INFORMATION

0x00000008

System ACL field from the security descriptor.

MQDS_SIGN_PUBLIC_KEY

0x80000000

Signing public key.

MQDS_KEYX_PUBLIC_KEY

0x40000000

Encrypting public key.

The SecurityInformation parameter MUST specify one of:

If the SecurityInformation parameter includes an invalid combination, the server MUST NOT complete the call, and MUST return an error.

pSecurityDescriptor: If the SecurityInformation parameter is MQDS_SIGN_PUBLIC_KEY or MQDS_KEYX_PUBLIC_KEY, it SHOULD<55> contain a pointer to a BLOBHEADER (section 2.2.19) structure followed by an RSAPUBKEY (section 2.2.18) structure. Otherwise, this parameter contains a security descriptor, as specified in [MS-DTYP] section 2.4.6.

nLength:  MUST be set by the client to the length in bytes of the pSecurityDescriptor buffer.

lpnLengthNeeded:  A DWORD representing the length in bytes of the requested security descriptor or public key.

phServerAuth:  A PCONTEXT_HANDLE_SERVER_AUTH_TYPE RPC context handle acquired from the pphServerAuth parameter in a previous call to S_DSValidateServer. The server MUST use this parameter as a key to locate the GSS security context used to compute the signature returned in pbServerSignature. See section 3.1.4.2.

pbServerSignature: Contains a signed hash over the returned property values.

pdwServerSignatureSize: A DWORD that contains the maximum length in bytes of the server signature to return.

Return Values:  If the method succeeds, the return value is 0. If the method fails, the return value is an implementation-specific error code.

MQ_OK (0x00000000)

MQ_ERROR_USER_BUFFER_TOO_SMALL (0xC00E0028)

MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL (0xC00E0023)

MQDS_WRONG_OBJ_TYPE (0xC00E0506)

MQ_ERROR_INVALID_PARAMETER (0xC00E0006)

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE].

 When processing this call, the server MUST: