[host][openbsd][v3] Fix wrong OpenBSD user count
This commit is contained in:
parent
2782a109dc
commit
ddef7ea64d
|
@ -78,7 +78,7 @@ func UsersWithContext(ctx context.Context) ([]UserStat, error) {
|
|||
var u Utmp
|
||||
br := bytes.NewReader(b)
|
||||
err := binary.Read(br, binary.LittleEndian, &u)
|
||||
if err != nil || u.Time == 0 {
|
||||
if err != nil || u.Time == 0 || u.Name[0] == 0 {
|
||||
continue
|
||||
}
|
||||
user := UserStat{
|
||||
|
|
Loading…
Reference in New Issue