LSA_GET_AUTH_DATA_FOR_USER callback function (ntsecpkg.h)
The GetAuthDataForUser function retrieves authentication information for a user from the Security Accounts Manager (SAM) database and puts it into a format suitable for the ConvertAuthDataToToken function.
Syntax
LSA_GET_AUTH_DATA_FOR_USER LsaGetAuthDataForUser;
NTSTATUS LsaGetAuthDataForUser(
[in] PSECURITY_STRING Name,
[in] SECPKG_NAME_TYPE NameType,
[in] PSECURITY_STRING Prefix,
[out] PUCHAR *UserAuthData,
[out] PULONG UserAuthDataSize,
[out] PUNICODE_STRING UserFlatName
)
{...}
Parameters
[in] Name
Pointer to a UNICODE_STRING structure that specifies the name of the SAM account.
[in] NameType
A SECPKG_NAME_TYPE enumeration value that specifies the type of account name in Name. This parameter can be one of the following values.
Value | Meaning |
---|---|
|
Name is compatible with the SAM. An example of a name in SAM-compatible format is "ExampleDomain\Username". |
|
Name is in the AltSecId property of the SAM account. You must specify a value for the Prefix parameter when using this value. |
|
Name is a flat user principal name (UPN) style account name. |
|
Name is the distinguished name of the object. For more information, see Remarks. |
[in] Prefix
Pointer to a UNICODE_STRING structure that contains the prefix to use for names specified with the SecNameAlternateId NameType.
[out] UserAuthData
Pointer that receives the address of the retrieved data.
[out] UserAuthDataSize
Pointer to a ULONG that receives the size of the retrieved data.
[out] UserFlatName
Pointer to a UNICODE_STRING structure that receives the UPN, if applicable.
Return value
If the function succeeds, the return value is STATUS_SUCCESS.
If the function fails, the return value is an NTSTATUS code that indicates the reason it failed.
Remarks
The GetAuthDataForUser function combines the OpenSamUser, GetUserAuthData, and CloseSamUser functions into one call.
Pointers to these functions are available in the LSA_SECPKG_FUNCTION_TABLE structure received by the SpInitialize function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntsecpkg.h |