Bug 24372

Summary: [PATCH] (cosmetic) -current send-pr breaks NIS support
Product: Base System Reporter: dima <dima>
Component: gnuAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description dima 2001-01-16 06:40:01 UTC
send-pr on -current uses `cat /etc/passwd` when looking for the
default name for the ``Originator'' field.  If the user filing the
problem report doesn't have a local account (authenticated via NIS,
for example), the field will be left blank.

Of course, one can always set the field manually, but this works in
RELENG_4, so why shouldn't it work in 5-CURRENT?

Fix: The following patch employs a different method from that in RELENG_4.
The latter uses something to the effect of,

	ypcat passwd | cat - /etc/passwd

which fixes the problem, but is not the Right Way(tm).  The following
patch uses pw(8) to do the dirty work.
How-To-Repeat: 
Sign on using an account authenticated via NIS or anything which
doesn't require an entry in the local password database, then do:

	send-pr -P | grep '^>Originator'

and notice how the field is blank.  Now sign on with a local account,
repeat the above command, and notice how your name appears.
Comment 1 dd freebsd_committer freebsd_triage 2001-05-24 04:49:52 UTC
State Changed
From-To: open->closed

Committed my own patch.