Documentation ¶
Rendered for windows/amd64
Index ¶
- Constants
- Variables
- func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, ...) (err error)
- func ChangeServiceConfig(service syscall.Handle, serviceType uint32, startType uint32, ...) (err error)
- func ChangeServiceConfig2(service syscall.Handle, infoLevel uint32, info *byte) (err error)
- func CloseServiceHandle(handle syscall.Handle) (err error)
- func ControlService(service syscall.Handle, control uint32, status *SERVICE_STATUS) (err error)
- func CreateEvent(eventAttrs *syscall.SecurityAttributes, manualReset uint32, ...) (handle syscall.Handle, err error)
- func CreateService(mgr syscall.Handle, serviceName *uint16, displayName *uint16, access uint32, ...) (handle syscall.Handle, err error)
- func DeleteService(service syscall.Handle) (err error)
- func DeregisterEventSource(handle syscall.Handle) (err error)
- func EqualSid(sid1 *syscall.SID, sid2 *syscall.SID) (isEqual bool)
- func FreeSid(sid *syscall.SID) (err error)
- func GetCurrentThreadId() (id uint32)
- func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle syscall.Handle, err error)
- func OpenService(mgr syscall.Handle, serviceName *uint16, access uint32) (handle syscall.Handle, err error)
- func QueryServiceConfig(service syscall.Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, ...) (err error)
- func QueryServiceConfig2(service syscall.Handle, infoLevel uint32, buff *byte, buffSize uint32, ...) (err error)
- func QueryServiceStatus(service syscall.Handle, status *SERVICE_STATUS) (err error)
- func RegCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, ...) (regerrno error)
- func RegDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error)
- func RegSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, ...) (regerrno error)
- func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle syscall.Handle, err error)
- func ReportEvent(log syscall.Handle, etype uint16, category uint16, eventId uint32, ...) (err error)
- func SetEvent(event syscall.Handle) (err error)
- func SetServiceStatus(service syscall.Handle, serviceStatus *SERVICE_STATUS) (err error)
- func StartService(service syscall.Handle, numArgs uint32, argVectors **uint16) (err error)
- func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error)
- type QUERY_SERVICE_CONFIG
- type SERVICE_DESCRIPTION
- type SERVICE_STATUS
- type SERVICE_TABLE_ENTRY
- type SidIdentifierAuthority
- type Tokengroups
Constants ¶
View Source
const ( EVENTLOG_ERROR_TYPE = 1 << iota EVENTLOG_WARNING_TYPE EVENTLOG_INFORMATION_TYPE EVENTLOG_AUDIT_SUCCESS EVENTLOG_AUDIT_FAILURE EVENTLOG_SUCCESS = 0 )
View Source
const ( REG_OPTION_NON_VOLATILE = 0 REG_CREATED_NEW_KEY = 1 REG_OPENED_EXISTING_KEY = 2 )
View Source
const ( SECURITY_NULL_RID = 0 SECURITY_WORLD_RID = 0 SECURITY_LOCAL_RID = 0 SECURITY_CREATOR_OWNER_RID = 0 SECURITY_CREATOR_GROUP_RID = 1 SECURITY_DIALUP_RID = 1 SECURITY_NETWORK_RID = 2 SECURITY_BATCH_RID = 3 SECURITY_INTERACTIVE_RID = 4 SECURITY_LOGON_IDS_RID = 5 SECURITY_SERVICE_RID = 6 SECURITY_LOCAL_SYSTEM_RID = 18 SECURITY_BUILTIN_DOMAIN_RID = 32 SECURITY_PRINCIPAL_SELF_RID = 10 SECURITY_CREATOR_OWNER_SERVER_RID = 0x2 SECURITY_CREATOR_GROUP_SERVER_RID = 0x3 SECURITY_LOGON_IDS_RID_COUNT = 0x3 SECURITY_ANONYMOUS_LOGON_RID = 0x7 SECURITY_PROXY_RID = 0x8 SECURITY_ENTERPRISE_CONTROLLERS_RID = 0x9 SECURITY_SERVER_LOGON_RID = SECURITY_ENTERPRISE_CONTROLLERS_RID SECURITY_AUTHENTICATED_USER_RID = 0xb SECURITY_RESTRICTED_CODE_RID = 0xc SECURITY_NT_NON_UNIQUE_RID = 0x15 )
View Source
const ( SC_MANAGER_CONNECT = 1 << iota SC_MANAGER_CREATE_SERVICE SC_MANAGER_ENUMERATE_SERVICE SC_MANAGER_LOCK SC_MANAGER_QUERY_LOCK_STATUS SC_MANAGER_MODIFY_BOOT_CONFIG SC_MANAGER_ALL_ACCESS = 0xf003f )
View Source
const ( SERVICE_KERNEL_DRIVER = 1 << iota SERVICE_FILE_SYSTEM_DRIVER SERVICE_ADAPTER SERVICE_RECOGNIZER_DRIVER SERVICE_WIN32_OWN_PROCESS SERVICE_WIN32_SHARE_PROCESS SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS SERVICE_INTERACTIVE_PROCESS = 256 SERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER SERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS )
View Source
const ( SERVICE_BOOT_START = iota SERVICE_SYSTEM_START SERVICE_AUTO_START SERVICE_DEMAND_START SERVICE_DISABLED )
View Source
const ( SERVICE_ERROR_IGNORE = iota SERVICE_ERROR_NORMAL SERVICE_ERROR_SEVERE SERVICE_ERROR_CRITICAL )
View Source
const ( SERVICE_STOPPED = 1 + iota SERVICE_START_PENDING SERVICE_STOP_PENDING SERVICE_RUNNING SERVICE_CONTINUE_PENDING SERVICE_PAUSE_PENDING SERVICE_PAUSED SERVICE_NO_CHANGE = 0xffffffff )
View Source
const ( SERVICE_ACCEPT_STOP = 1 << iota SERVICE_ACCEPT_PAUSE_CONTINUE SERVICE_ACCEPT_SHUTDOWN SERVICE_ACCEPT_PARAMCHANGE SERVICE_ACCEPT_NETBINDCHANGE SERVICE_ACCEPT_HARDWAREPROFILECHANGE SERVICE_ACCEPT_POWEREVENT SERVICE_ACCEPT_SESSIONCHANGE )
View Source
const ( SERVICE_CONTROL_STOP = 1 + iota SERVICE_CONTROL_PAUSE SERVICE_CONTROL_CONTINUE SERVICE_CONTROL_INTERROGATE SERVICE_CONTROL_SHUTDOWN SERVICE_CONTROL_PARAMCHANGE SERVICE_CONTROL_NETBINDADD SERVICE_CONTROL_NETBINDREMOVE SERVICE_CONTROL_NETBINDENABLE SERVICE_CONTROL_NETBINDDISABLE SERVICE_CONTROL_DEVICEEVENT SERVICE_CONTROL_HARDWAREPROFILECHANGE SERVICE_CONTROL_POWEREVENT SERVICE_CONTROL_SESSIONCHANGE )
View Source
const ( SERVICE_ACTIVE = 1 + iota SERVICE_INACTIVE SERVICE_STATE_ALL )
View Source
const ( SERVICE_QUERY_CONFIG = 1 << iota SERVICE_CHANGE_CONFIG SERVICE_QUERY_STATUS SERVICE_ENUMERATE_DEPENDENTS SERVICE_START SERVICE_STOP SERVICE_PAUSE_CONTINUE SERVICE_INTERROGATE SERVICE_USER_DEFINED_CONTROL SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL SERVICE_RUNS_IN_SYSTEM_PROCESS = 1 SERVICE_CONFIG_DESCRIPTION = 1 SERVICE_CONFIG_FAILURE_ACTIONS = 2 )
View Source
const ( STANDARD_RIGHTS_REQUIRED = 0xf0000 ERROR_SERVICE_SPECIFIC_ERROR syscall.Errno = 1066 )
View Source
const (
NO_ERROR = 0
)
View Source
const (
SC_STATUS_PROCESS_INFO = 0
)
Variables ¶
View Source
var ( SECURITY_NULL_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 0}} SECURITY_WORLD_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 1}} SECURITY_LOCAL_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 2}} SECURITY_CREATOR_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 3}} SECURITY_NON_UNIQUE_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 4}} SECURITY_NT_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 5}} SECURITY_MANDATORY_LABEL_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 16}} )
Functions ¶
func ChangeServiceConfig ¶
func ChangeServiceConfig2 ¶
func CloseServiceHandle ¶
func ControlService ¶
func ControlService(service syscall.Handle, control uint32, status *SERVICE_STATUS) (err error)
func CreateEvent ¶
func CreateService ¶
func CreateService(mgr syscall.Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle syscall.Handle, err error)
func DeleteService ¶
func DeregisterEventSource ¶
func GetCurrentThreadId ¶
func GetCurrentThreadId() (id uint32)
func OpenSCManager ¶
func OpenService ¶
func QueryServiceConfig ¶
func QueryServiceConfig2 ¶
func QueryServiceStatus ¶
func QueryServiceStatus(service syscall.Handle, status *SERVICE_STATUS) (err error)
func RegCreateKeyEx ¶
func RegSetValueEx ¶
func RegisterEventSource ¶
func ReportEvent ¶
func SetServiceStatus ¶
func SetServiceStatus(service syscall.Handle, serviceStatus *SERVICE_STATUS) (err error)
func StartService ¶
func StartServiceCtrlDispatcher ¶
func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error)
Types ¶
type QUERY_SERVICE_CONFIG ¶
type SERVICE_DESCRIPTION ¶
type SERVICE_DESCRIPTION struct {
Description *uint16
}
type SERVICE_STATUS ¶
type SERVICE_TABLE_ENTRY ¶
type SidIdentifierAuthority ¶
type SidIdentifierAuthority struct {
Value [6]byte
}
type Tokengroups ¶
type Tokengroups struct { GroupCount uint32 Groups [1]syscall.SIDAndAttributes }
Click to show internal directories.
Click to hide internal directories.