lib

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GZType   = "gz"
	XZType   = "xz"
	LZMAType = "lzma"
)

Variables

This section is empty.

Functions

func CreateLuks added in v0.8.0

func CreateLuks(dev, password, version string, cryptsetupArgs ...string) error

func ExtractInitrd added in v0.8.0

func ExtractInitrd(initrd string, dst string) error

func FindPartition added in v0.8.0

func FindPartition(label string) (string, *block.Partition, error)

func GetPassword

func GetPassword(b *block.Partition) (password string, err error)

GetPassword gets the password for a block.Partition TODO: Ask to discovery a pass to unlock. keep waiting until we get it and a timeout is exhausted with retrials (exp backoff)

func InjectInitrd added in v0.8.0

func InjectInitrd(initrd string, file, dst string) error

func LuksUnlock

func LuksUnlock(device, mapper, password string) error

func Luksify added in v0.8.0

func Luksify(label, version string, tpm bool) (string, error)

Luksify Take a part label, and recreates it with LUKS. IT OVERWRITES DATA! On success, it returns a machine parseable string with the partition information (label:name:uuid) so that it can be stored by the caller for later use. This is because the label of the encrypted partition is not accessible unless the partition is decrypted first and the uuid changed after encryption so any stored information needs to be updated (by the caller).

func SH added in v0.8.0

func SH(c string) (string, error)

func UnlockAll

func UnlockAll(tpm bool) error

UnlockAll Unlocks all encrypted devices found in the system

func UnlockAllWithLogger added in v0.10.0

func UnlockAllWithLogger(tpm bool, logger zerolog.Logger) error

func UnlockDisk

func UnlockDisk(b *block.Partition) error

UnlockDisk unlocks a single block.Partition

func Waitdevice added in v0.8.0

func Waitdevice(device string, attempts int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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