Skip to content

Commit ddef7ea

Browse files
committed
[host][openbsd][v3] Fix wrong OpenBSD user count
1 parent 2782a10 commit ddef7ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v3/host/host_openbsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func UsersWithContext(ctx context.Context) ([]UserStat, error) {
7878
var u Utmp
7979
br := bytes.NewReader(b)
8080
err := binary.Read(br, binary.LittleEndian, &u)
81-
if err != nil || u.Time == 0 {
81+
if err != nil || u.Time == 0 || u.Name[0] == 0 {
8282
continue
8383
}
8484
user := UserStat{

0 commit comments

Comments
 (0)