sysuser

package
v7.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 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 ContainershipMount is mounted as a hostPath. This is not thread-safe and is expected to only be called on initialization.

func UsernameFromContainershipUID

func UsernameFromContainershipUID(uid string) string

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

func UsernameToContainershipUID

func UsernameToContainershipUID(username string) string

UsernameToContainershipUID returns the Containership 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