xs/vendor/blitter.com/go/goutmp
Russ Magee 3eee573231 Resync w/cryptmt, wanderer repos
Signed-off-by: Russ Magee <rmagee@gmail.com>
2020-02-05 21:26:03 -08:00
..
goutmp.go 1/3 Updated Makefile to allow VENDOR flag (adds -vendor to version string) 2020-01-29 17:23:44 -08:00
LICENSE.mit 1/3 Updated Makefile to allow VENDOR flag (adds -vendor to version string) 2020-01-29 17:23:44 -08:00
README.md Resync w/cryptmt, wanderer repos 2020-02-05 21:26:03 -08:00

goutmp - Minimal bindings to C stdlib pututmpx(), getutmpx() (/var/log/wtmp) and /var/log/lastlog

Any Go program which allows user shell access should update the standard UNIX files which track user sessions: /var/log/wtmp (for the 'w' and 'who' commands), and /var/log/lastlog (the 'last' and 'lastlog' commands).

go doc
package goutmp // import "blitter.com/go/goutmp"

Golang bindings for basic login/utmp accounting

type UtmpEntry struct{ ... }

func Put_lastlog_entry(app, usr, ptsname, host string)
func Unput_utmp(entry UtmpEntry)
func Put_utmp(user, ptsname, host string) UtmpEntry