sysuser

package
v0.0.0-...-a606d81 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthorizedKeysFullPath

func GetAuthorizedKeysFullPath() string

GetAuthorizedKeysFullPath returns the full path to the authorized_keys file.

func InitializeAuthorizedKeysFileStructure

func InitializeAuthorizedKeysFileStructure() error

InitializeAuthorizedKeysFileStructure does everything required to make SSH work on host: creates the SSH directory, initializes a blank authorized_keys file, (to simplify e.g. file watching), and puts the login script in place. Assumes that HKSMount is mounted as a hostPath. This is not thread-safe and is expected to only be called on initialization.

func UsernameFromHKSUID

func UsernameFromHKSUID(uid string) string

UsernameFromHKSUID returns the system username that the passed UID maps to TODO error handling needed? Probably.

func UsernameToHKSUID

func UsernameToHKSUID(username string) string

UsernameToHKSUID returns the HKS UID that the passed system username maps to

func WriteAuthorizedKeys

func WriteAuthorizedKeys(users []v3.UserSpec) error

WriteAuthorizedKeys writes the authorized keys for the given users to the authorized_keys file, stomping on the existing file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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