diff --git a/goutmp.go b/goutmp.go index dd8303a..bf325f5 100644 --- a/goutmp.go +++ b/goutmp.go @@ -84,10 +84,12 @@ import ( "time" ) +// UtmpEntry wraps the C struct utmpx type UtmpEntry struct { entry C.struct_utmpx } +// Put a username and the originating host/IP to utmp func Put_utmp(user string, host string) (UtmpEntry) { var entry UtmpEntry @@ -95,10 +97,12 @@ func Put_utmp(user string, host string) (UtmpEntry) { return entry } +// Remove a username/host entry from utmp func Unput_utmp(entry UtmpEntry) { C.unpututmp(&entry.entry) } +// Put the login app, username and originating host/IP to lastlog func Put_lastlog_entry(app string, usr string, host string) { u, e := user.Lookup(usr) if e != nil {