Share via


IUrlAccessor::GetSecurityDescriptor Method

Gets the security descriptor for the URL item. Security is applied at query time, so this descriptor identifies security for read access.

Syntax

HRESULT GetSecurityDescriptor(      
    DWORD dwSize,
    BYTE *pSD,
    DWORD *pdwLength
);

Parameters

  • dwSize
    [in]  Size in TCHARs of the pSD array.
  • pSD
    [out]  Receives a pointer to the security descriptor.
  • pdwLength
    [out]  Receives a pointer to the number of TCHARs written to pSD, not including the terminating NULL.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

This method allows custom mappings between users registered to a content source and those users registered on the domain, if they are different. Security descriptors created in this method must be self-relative.

If the URL contains a user security identifier (SID), then the protocol handler is invoked in the security context of that user, and this method must return E_NOTIMPL.

If the URL does not contain a user SID, then the protocol handler is invoked in the security context of the system service. In that case, this method can return either an access control list (ACL) to restrict read access, or PRTH_S_ACL_IS_READ_EVERYONE to allow anyone read access during querying.

Note  If this method returns E_NOTIMPL and the URL does NOT contain a user SID, then the item is retrievable by all user queries.

See Also

Search Protocol Handler Error Messages