securelaunch

package
v7.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package securelaunch takes integrity measurements before launching the target system.

Index

Constants

This section is empty.

Variables

View Source
var Debug = func(string, ...interface{}) {}

Debug enables verbose logs if kernel cmd line has uroot.uinitargs=-d flag set. kernel cmdline is checked in sluinit.

View Source
var StorageBlkDevices block.BlockDevices

StorageBlkDevices helps securelaunch pkg mount devices.

Functions

func AddToPersistQueue

func AddToPersistQueue(desc string, data []byte, location string, defFile string) error

AddToPersistQueue enqueues an action item to persistData slice so that it can be deferred to the last step of sluinit.

func ClearPersistQueue

func ClearPersistQueue() error

ClearPersistQueue persists any pending data/logs to disk

func GetBlkInfo

func GetBlkInfo() error

GetBlkInfo calls storage package to get information on all block devices. The information is stored in a global variable 'StorageBlkDevices' If the global variable is already non-zero, we skip the call to storage package.

In debug mode, it also prints names and UUIDs for all devices.

func GetMountedFilePath

func GetMountedFilePath(inputVal string, flags uintptr) (string, error)

GetMountedFilePath returns a file path corresponding to a <device_identifier>:<path> user input format. <device_identifier> may be a Linux block device identifier like sda or a FS UUID.

func GetStorageDevice

func GetStorageDevice(input string) (*block.BlockDev, error)

GetStorageDevice parses input of type UUID:/tmp/foo or sda2:/tmp/foo, and returns any matching devices.

func MountDevice

func MountDevice(device *block.BlockDev, flags uintptr) (string, error)

MountDevice looks up mountCache map. if no entry is found, it mounts a device and updates cache, otherwise returns mountPath.

func UnmountAll

func UnmountAll()

UnmountAll loops detaches any mounted device from the file heirarchy.

func WriteToFile

func WriteToFile(data []byte, dst, defFileName string) (string, error)

WriteToFile writes a byte slice to a target file on an already mounted disk and returns the target file path.

defFileName is default dst file name, only used if user doesn't provide one.

Types

This section is empty.

Directories

Path Synopsis
Package eventlog parses kernel event logs and saves the parsed data on a file on disk.
Package eventlog parses kernel event logs and saves the parsed data on a file on disk.
Package launcher boots the target kernel.
Package launcher boots the target kernel.
Package measurement provides different collectors to hash files, disks, dmi info and cpuid info.
Package measurement provides different collectors to hash files, disks, dmi info and cpuid info.
Package policy locates and parses a JSON policy file.
Package policy locates and parses a JSON policy file.
Package tpm reads and extends pcrs with measurements.
Package tpm reads and extends pcrs with measurements.

Jump to

Keyboard shortcuts

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