Documentation
¶
Overview ¶
Package appcontrol knows about Windows' Smart App Control: whether it's on, whether the programs and libraries about to be installed are signed so that it would let them run, and how to say so when it blocks one. On other systems it has nothing to say.
Smart App Control lets a program or DLL load only if Microsoft's reputation service knows it, or it's signed by a publisher Windows trusts. There's no exception for one program, and once turned off it can't be turned on again without reinstalling Windows, so nothing here ever suggests turning it off.
Index ¶
Constants ¶
const ( Off = "off" On = "on" Evaluation = "evaluation" // watching, not blocking yet: it turns itself on or off later )
Smart App Control's states, as Windows Security names them.
Variables ¶
This section is empty.
Functions ¶
func CheckInstall ¶
CheckInstall answers before files are installed: a *Blocked when Smart App Control is on and any program or library under dir isn't signed, otherwise nil. While Smart App Control is only in evaluation, it blocks nothing, so neither does this.
func Explain ¶
Explain turns a failure to start the program at path into a *Blocked when Windows refused it for its application control policy, which is what Smart App Control does. Other errors are returned as they are.
func IsPE ¶
IsPE reports whether the file is a Windows program or library, by its first bytes rather than its name, so a renamed DLL isn't missed.
func State ¶
func State() string
State is Smart App Control's state on this computer, or "" where there's no such thing (not Windows, or a Windows without it).
Types ¶
type Blocked ¶
type Blocked struct {
What string // "this module", "this core"
Files []string // the files it would block, or did
Ran bool // Windows refused to start it, rather than a check before installing
Fix string // what to do instead
}
Blocked is the answer when Smart App Control would block, or has blocked, a file.