daemon

package
v0.0.0-...-9fbfcc2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PSSHSoftwareVersion is the softwareversion field of RFC 4253 section 4.2.
	PSSHSoftwareVersion string = "PROTECTEDSSH0.1"
)

Variables

This section is empty.

Functions

func Run

func Run(opts Opts, exit chan ExitMode, log chan Message) (err error)

Run runs the daemon using the given DaemonOpts object.

Types

type ExitMode

type ExitMode int8

ExitMode is the mode for exiting. Only the explicit constants should be used.

const (
	// ExitRude indicates that the daemon should exit as soon as it receives this notification.
	// Nothing should be expected to be logged and there should be no cleanup.
	ExitRude ExitMode = 1

	// ExitErr is the same as ExitRude but should log the message for exiting.
	ExitErr ExitMode = -1

	// ExitClean indicates that the daemon should exit cleanly when it's safe to do so.
	// Only the cleanup will be logged.
	ExitClean ExitMode = 2

	// ExitWithReason is the same as ExitClean but should log the reason for exiting.
	ExitWithReason ExitMode = -2
)

type Message

type Message string

Message is some message being sent to the daemon that should be logged.

type Opts

type Opts struct {
	// contains filtered or unexported fields
}

Opts is the options that are used to run the daemon. TODO: should be parsed from /etc/protectedssh/config.toml or something like that.

type User

type User struct {
	// contains filtered or unexported fields
}

User is the configuration for a psshd user.

Jump to

Keyboard shortcuts

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