AuthzAddSidsToContext function

The AuthzAddSidsToContext function creates a copy of an existing context and appends a given set of security identifiers (SIDs) and restricted SIDs.

Syntax

AUTHZAPI BOOL AuthzAddSidsToContext(
  AUTHZ_CLIENT_CONTEXT_HANDLE  hAuthzClientContext,
  PSID_AND_ATTRIBUTES          Sids,
  DWORD                        SidCount,
  PSID_AND_ATTRIBUTES          RestrictedSids,
  DWORD                        RestrictedSidCount,
  PAUTHZ_CLIENT_CONTEXT_HANDLE phNewAuthzClientContext
);

Parameters

hAuthzClientContext

An AUTHZ_CLIENT_CONTEXT_HANDLE structure to be copied as the basis for NewClientContext.

Sids

A pointer to a SID_AND_ATTRIBUTES structure containing the SIDs and attributes to be added to the unrestricted part of the client context.

SidCount

The number of SIDs to be added.

RestrictedSids

A pointer to a SID_AND_ATTRIBUTES structure containing the SIDs and attributes to be added to the restricted part of the client context.

RestrictedSidCount

Number of restricted SIDs to be added.

phNewAuthzClientContext

A pointer to the created AUTHZ_CLIENT_CONTEXT_HANDLE structure containing input values for expiration time, identifier, flags, additional SIDs and restricted SIDs.

Return value

If the function succeeds, it returns TRUE.

If the function fails, it returns FALSE. To get extended error information, call GetLastError.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header authz.h
Library Authz.lib
DLL Authz.dll
Redistributable Windows Server 2003 Administration Tools Pack on Windows XP

See also

Basic Access Control Functions

SID_AND_ATTRIBUTES