secur32

package
v0.30.0-rc.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LsaEnumerateLogonSessions

func LsaEnumerateLogonSessions(sessionCount *uint32, sessions *uintptr) error

func LsaFreeReturnBuffer

func LsaFreeReturnBuffer(buffer uintptr) error

func LsaGetLogonSessionData

func LsaGetLogonSessionData(luid *windows.LUID, ppLogonSessionData **SECURITY_LOGON_SESSION_DATA) error

func LsaNtStatusToWinError

func LsaNtStatusToWinError(ntstatus uintptr) error

Types

type LSA_LAST_INTER_LOGON_INFO

type LSA_LAST_INTER_LOGON_INFO struct {
	LastSuccessfulLogon                        windows.Filetime
	LastFailedLogon                            windows.Filetime
	FailedAttemptCountSinceLastSuccessfulLogon uint32
}

type LUID

type LUID windows.LUID

func (LUID) String

func (l LUID) String() string

type LogonSessionData

type LogonSessionData struct {
	LogonId               LUID
	UserName              string
	LogonDomain           string
	AuthenticationPackage string
	LogonType             LogonType
	Session               uint32
	Sid                   *windows.SID
	LogonTime             time.Time
}

func GetLogonSessionData

func GetLogonSessionData(luid *windows.LUID) (*LogonSessionData, error)

func GetLogonSessions

func GetLogonSessions() ([]*LogonSessionData, error)

type LogonType

type LogonType uint32
const (
	// LogonTypeSystem Not explicitly defined in LSA, but according to
	// https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-logonsession,
	// LogonType=0 is "Used only by the System account."
	LogonTypeSystem LogonType = iota

	LogonTypeInteractive
	LogonTypeNetwork
	LogonTypeBatch
	LogonTypeService
	LogonTypeProxy
	LogonTypeUnlock
	LogonTypeNetworkCleartext
	LogonTypeNewCredentials
	LogonTypeRemoteInteractive
	LogonTypeCachedInteractive
	LogonTypeCachedRemoteInteractive
	LogonTypeCachedUnlock
)

func (LogonType) String

func (lt LogonType) String() string

type SECURITY_LOGON_SESSION_DATA

type SECURITY_LOGON_SESSION_DATA struct {
	Size                  uint32
	LogonId               LUID
	UserName              windows.NTUnicodeString
	LogonDomain           windows.NTUnicodeString
	AuthenticationPackage windows.NTUnicodeString
	LogonType             LogonType
	Session               uint32
	Sid                   *windows.SID
	LogonTime             windows.Filetime
	LogonServer           windows.NTUnicodeString
	DnsDomainName         windows.NTUnicodeString
	Upn                   windows.NTUnicodeString
	UserFlags             uint32
	LastLogonInfo         LSA_LAST_INTER_LOGON_INFO
	LogonScript           windows.NTUnicodeString
	ProfilePath           windows.NTUnicodeString
	HomeDirectory         windows.NTUnicodeString
	HomeDirectoryDrive    windows.NTUnicodeString
	LogoffTime            windows.Filetime
	KickOffTime           windows.Filetime
	PasswordLastSet       windows.Filetime
	PasswordCanChange     windows.Filetime
	PasswordMustChange    windows.Filetime
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL