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 ¶
- func Close(utmpPath, wtmpPath string, tty *os.File) error
- func LogFailedLogin(btmpPath, username, hostname string, remote [4]int32) error
- func Open(utmpPath, wtmpPath string, username, hostname string, remote [4]int32, ...) error
- func PrepareAddr(addr net.Addr) ([4]int32, error)
- func UserWithPtyInDatabase(utmpPath string, username string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
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 LogFailedLogin ¶
LogFailedLogin writes a new entry to the btmp failed login log. This should be called when an interactive session fails due to a missing local user.
`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.
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 ¶
PrepareAddr parses and transforms a net.Addr into a format usable by other uacc functions.
func UserWithPtyInDatabase ¶
UserWithPtyInDatabase checks the user accounting database for the existence of an USER_PROCESS entry with the given username.
Types ¶
This section is empty.