security

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrorNotAllAsigned specifies that the token does not have one or more of the privileges specified in the state parameter.
	ErrorNotAllAsigned syscall.Errno = 1300
)

Errors returned by AdjustTokenPrivileges.

View Source
const (
	// PrivilegedEnabled enables the privilege.
	PrivilegedEnabled uint32 = 0x00000002
)

Attribute bits for privileges.

View Source
const (
	// SeDebugPrivilege is the name of the privilege used to debug programs.
	SeDebugPrivilege = "SeDebugPrivilege"
)

Variables

This section is empty.

Functions

func EnableTokenPrivileges

func EnableTokenPrivileges(token syscall.Token, privileges ...string) error

EnableTokenPrivileges enables the specified privileges in the given Token. The token must have TOKEN_ADJUST_PRIVILEGES access. If the token does not already contain the privilege it cannot be enabled.

func LookupAccount

func LookupAccount(buffer []byte, wbemSID bool) (string, string)

LookupAccount returns the account and domain name from a security identifier.

func LookupAllSids

func LookupAllSids() ([]string, error)

LookupAllSids returns SIDs for each user account in the system.

func SetDebugPrivilege

func SetDebugPrivilege()

SetDebugPrivilege sets the debug privilege in the current running process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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