uacc

package
v1.2.3-fred.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package uacc concerns itself with updating the user account database and log on nodes that a client connects to with an interactive session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(utmpPath, wtmpPath string, tty *os.File) error

Close marks an entry in the utmp database as DEAD_PROCESS. This should be called when an interactive session exits.

The `ttyName` parameter must be the name of the TTY including the `/dev/` prefix.

func Open

func Open(utmpPath, wtmpPath string, username, hostname string, remote [4]int32, tty *os.File) error

Open writes a new entry to the utmp database with a tag of `USER_PROCESS`. This should be called when an interactive session is started.

`username`: Name of the user the interactive session is running under. `hostname`: Name of the system the user is logged into. `remote`: IPv6 address of the remote host. `tty`: Pointer to the tty stream

func PrepareAddr

func PrepareAddr(addr net.Addr) ([4]int32, error)

PrepareAddr parses and transforms a net.Addr into a format usable by other uacc functions.

func UserWithPtyInDatabase

func UserWithPtyInDatabase(utmpPath string, username string) error

UserWithPtyInDatabase checks the user accounting database for the existence of an USER_PROCESS entry with the given username.

Types

This section is empty.

Jump to

Keyboard shortcuts

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