Documentation ¶
Overview ¶
Package modules provides fucntionality to install and sign Linux kernel modules.
Package modules provides fucntionality to install and sign Linux kernel modules.
Index ¶
- Constants
- func AppendSignature(outfilePath, modulefilePath, sigfilePath string) error
- func LoadModule(module *Module, moduleParams ModuleParameters) error
- func LoadPublicKey(keyName, keyPath, keyring string) error
- func UpdateHostLdCache(hostRootDir, moduleLibDir string) error
- type Module
- type ModuleParameters
Constants ¶
View Source
const ( // PKEYIDPKCS7 is a constant defined in https://github.com/torvalds/linux/blob/master/scripts/sign-file.c PKEYIDPKCS7 = byte(2) SecondaryKeyring = "%keyring:.secondary_trusted_keys" IMAKeyring = "%keyring:.ima" )
Variables ¶
This section is empty.
Functions ¶
func AppendSignature ¶
AppendSignature appends a raw PKCS#7 signature to the end of a given kernel module. This is basically the Go implementation of `scripts/sign-file -s` in Linux upstream.
func LoadModule ¶
func LoadModule(module *Module, moduleParams ModuleParameters) error
LoadModule loads a given kernel module to kernel.
func LoadPublicKey ¶
LoadPublicKey loads the given public key to system keyring.
func UpdateHostLdCache ¶
UpdateHostLdCache updates the ld cache on host.
Types ¶
type ModuleParameters ¶
func NewModuleParameters ¶
func NewModuleParameters() ModuleParameters
func (*ModuleParameters) Set ¶
func (i *ModuleParameters) Set(value string) error
func (*ModuleParameters) String ¶
func (i *ModuleParameters) String() string
Click to show internal directories.
Click to hide internal directories.