2020-04-26 00:50:02 +00:00
|
|
|
// +build linux
|
2020-04-26 02:42:32 +00:00
|
|
|
|
2018-06-01 20:18:05 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2018-06-29 21:36:31 +00:00
|
|
|
"time"
|
2018-10-02 18:04:33 +00:00
|
|
|
|
|
|
|
"blitter.com/go/goutmp"
|
2018-06-01 20:18:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2018-06-29 21:36:31 +00:00
|
|
|
user := "bin"
|
|
|
|
host := "test.example.com"
|
2022-03-19 07:13:23 +00:00
|
|
|
utmp := goutmp.Put_utmp(user, "/dev/pts0", host)
|
|
|
|
goutmp.Put_lastlog_entry("xs", user, "/dev/pts0", host)
|
2018-06-29 21:36:31 +00:00
|
|
|
time.Sleep(10 * time.Second)
|
|
|
|
goutmp.Unput_utmp(utmp)
|
2018-06-01 20:18:05 +00:00
|
|
|
}
|