LSA_CREATE_TOKEN_EX funzione di callback (ntsecpkg.h)

Crea token durante l'elaborazione delle chiamate a SpAcceptLsaModeContext.

Sintassi

LSA_CREATE_TOKEN_EX LsaCreateTokenEx;

NTSTATUS LsaCreateTokenEx(
  [in]  PLUID LogonId,
  [in]  PTOKEN_SOURCE TokenSource,
  [in]  SECURITY_LOGON_TYPE LogonType,
  [in]  SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
  [in]  LSA_TOKEN_INFORMATION_TYPE TokenInformationType,
  [in]  PVOID TokenInformation,
  [in]  PTOKEN_GROUPS TokenGroups,
  [in]  PUNICODE_STRING Workstation,
  [in]  PUNICODE_STRING ProfilePath,
  [in]  PVOID SessionInformation,
  [in]  SECPKG_SESSIONINFO_TYPE SessionInformationType,
  [out] PHANDLE Token,
  [out] PNTSTATUS SubStatus
)
{...}

Parametri

[in] LogonId

Puntatore a un identificatore di sessione di accesso per il nuovo token. Questo identificatore viene ottenuto da una chiamata precedente a CreateLogonSession.

[in] TokenSource

Puntatore a una struttura TOKEN_SOURCE che specifica l'origine per questo token. Specificare il nome del pacchetto.

[in] LogonType

Valore SECURITY_LOGON_TYPE che indica il tipo di accesso.

[in] ImpersonationLevel

Valore SECURITY_IMPERSONATION_LEVEL che indica l'entità in cui un processo server può rappresentare un processo client.

[in] TokenInformationType

Specifica il tipo di struttura nel parametro TokenInformation .

Valore Significato
LsaTokenInformationNull

LSA_TOKEN_INFORMATION_NULL

LsaTokenInformationV1

LSA_TOKEN_INFORMATION_V1

[in] TokenInformation

Puntatore alle informazioni sul token. Il tipo di struttura a cui punta tokenInformation è indicato dal parametro TokenInformationType .

[in] TokenGroups

Puntatore a una struttura TOKEN_GROUPS che specifica i gruppi non contenuti in TokenInformation.

[in] Workstation

Puntatore a una struttura UNICODE_STRING contenente il nome della workstation del client, in genere un nome NetBIOS.

[in] ProfilePath

Puntatore a una struttura UNICODE_STRING che contiene il percorso del profilo dell'utente, se presente.

[in] SessionInformation

Dati che specificano informazioni sulla sessione di accesso corrente. Il formato di questi dati viene specificato dal valore del parametro SessionInformationType .

[in] SessionInformationType

Valore dell'enumerazione SECPKG_SESSIONINFO_TYPE che specifica il formato del parametro SessionInformation . Attualmente, l'unico valore definito è SecSessionPrimaryCred, che specifica che il valore del parametro SessionInformation è una struttura SECPKG_PRIMARY_CRED .

[out] Token

Puntatore che riceve l'indirizzo di un handle al nuovo token. Al termine dell'uso dell'handle, chiuderlo chiamando la funzione CloseHandle .

[out] SubStatus

Puntatore a una variabile che riceve informazioni sugli errori.

Valore restituito

Se la funzione ha esito positivo, il valore restituito è STATUS_SUCCESS.

Se la funzione ha esito negativo, il valore restituito è un codice NTSTATUS che indica il motivo per cui non è riuscito.

Commenti

Un puntatore alla funzione CreateTokenEx è disponibile nella struttura LSA_SECPKG_FUNCTION_TABLE ricevuta dalla funzione SpInitialize .

Requisiti

Requisito Valore
Client minimo supportato Windows XP [solo app desktop]
Server minimo supportato Windows Server 2003 [solo app desktop]
Piattaforma di destinazione Windows
Intestazione ntsecpkg.h

Vedi anche

SpInitialize