auth

package
v0.0.0-...-a9f5695 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: ISC Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIMESTAMP_DIR string = "/run/doas"
)

Variables

This section is empty.

Functions

func PamAuth

func PamAuth(user string) *pam.Transaction

func ProcInfo

func ProcInfo(pid int) (int, uint64, error)

func SetEnv

func SetEnv(spath []string, targetUser user.User, keep bool) error

func TimestampClear

func TimestampClear(path string, f os.File) error

func TimestampOpen

func TimestampOpen(secs int64) (int, error)

func TimestampPath

func TimestampPath() (os.File, string, error)

func TimestampSet

func TimestampSet(path string, secs int64) error

for the time being this is basically a "translation" of OpenDoas C code. Fine for now, but I would like it to be handled cleaner in proper Go way.

func TimestampSetAfterAuth

func TimestampSetAfterAuth(secs int64) error

Types

type Entry

type Entry struct {
	Action   string
	Options  []string
	Identity string
	Target   string
	Cmd      string
	CmdArgs  []string
	Env      []string
}

func CheckConfig

func CheckConfig(user *user.User) (Entry, error)

Jump to

Keyboard shortcuts

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