Bug 52601 - [PATCH] rpc.yppasswdd fails if master.passwd is not in /etc/
Summary: [PATCH] rpc.yppasswdd fails if master.passwd is not in /etc/
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Blapp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-23 05:40 UTC by Dan Nelson
Modified: 2005-11-29 03:44 UTC (History)
0 users

See Also:


Attachments
file.diff (3.06 KB, patch)
2003-05-23 05:40 UTC, Dan Nelson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Nelson 2003-05-23 05:40:11 UTC
rpc.yppasswd always calls yp_mkdb on master.passwd, which really should
only be done if you are exporting /etc/master.passwd.

Fix: Only call pw_mkdb if passfile == _PATH_MASTERPASSWD.  Otherwise, rename
master.passwd to a temp filename, rename the new passwd to
master.passwd, and let yppwupdate update passwd as it sees fit.

This also fixes PR bin/7968.
How-To-Repeat: 	

Set up an NIS server, and run passwd on a client.  If it succeeds,
you'll see that passwd.db and spwd.db get created in /yar/yp.  It also
ends up zeroing out the passwd field in the passwd map, which is not a
good idea if you're serving non-FreeBSD clients.
Comment 1 Martin Blapp freebsd_committer freebsd_triage 2003-05-28 00:06:13 UTC
Responsible Changed
From-To: freebsd-bugs->mbr

Take this PR.
Comment 2 Martin Blapp freebsd_committer freebsd_triage 2003-06-15 11:39:58 UTC
State Changed
From-To: open->feedback

Committed to CURRENT. I guess we will need a patch 
for STABLE too, right ?
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2005-11-29 03:43:31 UTC
State Changed
From-To: feedback->closed

Committed back in 2003.