Skip to content

Latest commit

 

History

History
142 lines (103 loc) · 4.41 KB

nf-ntsecapi-lsaregisterlogonprocess.md

File metadata and controls

142 lines (103 loc) · 4.41 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:ntsecapi.LsaRegisterLogonProcess
LsaRegisterLogonProcess function (ntsecapi.h)
Establishes a connection to the LSA server and verifies that the caller is a logon application.
LsaRegisterLogonProcess
LsaRegisterLogonProcess function [Security]
_lsa_lsaregisterlogonprocess
ntsecapi/LsaRegisterLogonProcess
security.lsaregisterlogonprocess
security\lsaregisterlogonprocess.htm
security
1bef2949-b4c8-400e-8a2d-60aa88a4e238
12/05/2018
LsaRegisterLogonProcess, LsaRegisterLogonProcess function [Security], _lsa_lsaregisterlogonprocess, ntsecapi/LsaRegisterLogonProcess, security.lsaregisterlogonprocess
ntsecapi.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Secur32.lib
Secur32.dll
Windows
19H1
LsaRegisterLogonProcess
ntsecapi/LsaRegisterLogonProcess
c++
APIRef
kbSyntax
DllExport
Secur32.dll
LsaRegisterLogonProcess

LsaRegisterLogonProcess function

-description

The LsaRegisterLogonProcess function establishes a connection to the LSA server and verifies that the caller is a logon application.

-parameters

-param LogonProcessName [in]

Pointer to an LSA_STRING structure identifying the logon application. This should be a printable name suitable for display to administrators. For example, the Windows logon application might use the name "User32LogonProcess". This name is used by the LSA during auditing. LsaRegisterLogonProcess does not check whether the name is already in use.

This string must not exceed 127 bytes.

-param LsaHandle [out]

Pointer that receives a handle used in future authentication function calls.

-param SecurityMode [out]

The value returned is not meaningful and should be ignored.

-returns

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code. The following are possible error codes.

Return code Description
STATUS_PORT_CONNECTION_REFUSED
The caller does not have the SeTcbPrivilege privilege, which is required to call this function.

You can set this privilege by calling LsaAddAccountRights.

STATUS_NAME_TOO_LONG
The specified logon process name exceeds 127 bytes.
 

For more information, see LSA Policy Function Return Values.

The LsaNtStatusToWinError function converts an NTSTATUS code to a Windows error code.

-remarks

This function must be called before a logon process may use any other logon authentication functions provided by the LSA.

The LsaRegisterLogonProcess function verifies that the application making the function call is a logon process by checking that it has the SeTcbPrivilege privilege set. It also opens the application's process for PROCESS_DUP_HANDLE access in anticipation of future LSA authentication calls. For more information, see DuplicateHandle.

When you have finished using the connection to the LSA server, delete the caller's logon application context and close the connection by calling the LsaDeregisterLogonProcess function.

-see-also

LsaAddAccountRights

LsaConnectUntrusted

LsaDeregisterLogonProcess