goutmp/README.md

18 lines
602 B
Markdown
Raw Normal View History

2018-06-27 22:24:11 +00: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).
2018-06-27 22:27:12 +00:00
```
2018-06-27 22:24:11 +00:00
go doc
package goutmp // import "blitter.com/go/goutmp"
Golang bindings for basic login/utmp accounting
2018-06-27 22:27:12 +00:00
type UtmpEntry struct{ ... }
2019-07-06 07:23:16 +00:00
func Put_lastlog_entry(app, usr, ptsname, host string)
2018-06-27 22:24:11 +00:00
func Unput_utmp(entry UtmpEntry)
2019-07-06 07:23:16 +00:00
func Put_utmp(user, ptsname, host string) UtmpEntry
2018-06-27 22:27:12 +00:00
```
2018-06-27 22:24:11 +00:00