Bug 45990 - top(1) dumps core if specific errors in password file
Summary: top(1) dumps core if specific errors in password file
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.7-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-04 17:30 UTC by Michael Hogsett
Modified: 2018-06-23 03:11 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Hogsett 2002-12-04 17:30:00 UTC
If there is an incorrect entry in a NIS netgroup file & this netgroup file
is used to append specific NIS password database entries to the local
password database top will dump core at startup.

In gdb it shows top failed inside endpwent(3)

(gdb) where
#0  0x2810cbd8 in endpwent () from /usr/lib/libc.so.4
#1  0x2810d421 in endpwent () from /usr/lib/libc.so.4
#2  0x2810c1da in getpwent () from /usr/lib/libc.so.4
#3  0x804b28e in free ()
#4  0x804cb94 in clear ()
#5  0x8049389 in free ()

Since this error is appears to be within endpwent(3) I presume that
programs using this function may also be unstable.

Fix: 

Well obviously fix the netgroup file error, but endpwent(3) should not
fail so severely.
How-To-Repeat: 
NIS netgroup file [NOTE: user3 entry incorrect] :

somegroup (,user2,),(,user2,),(user3)

master.password contains :

+@somegroup::::::::/tmp:/usr/bin/false
Comment 1 dwmalone freebsd_committer freebsd_triage 2002-12-21 15:33:49 UTC
Responsible Changed
From-To: freebsd-bugs->dwmalone

Ahhh - was looking at a top PR which suggested there was a bug like 
this in the NIS stuff. I'll take this PR too, in the hope it will 
help me track it down.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2012-07-10 04:41:51 UTC
Responsible Changed
From-To: dwmalone->freebsd-bugs

over to the pool (approved by bugmeister)
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:23 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2018-06-23 03:11:33 UTC
This is no longer an issue.