Bug 209718 - -DNO_ROOT+WITHOUT_NIS results in an invalid nsswitch.conf
Summary: -DNO_ROOT+WITHOUT_NIS results in an invalid nsswitch.conf
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2016-05-23 18:06 UTC by Mark Johnston
Modified: 2016-05-24 00:09 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Mark Johnston freebsd_committer 2016-05-23 18:06:08 UTC
When WITHOUT_NIS is set, some code in /etc/Makefile will edit the installed nsswitch.conf to remove NIS compat DBs and sources. When building with -DNO_ROOT, the size of nsswitch.conf is recorded in the mtree log before this edit is performed, so the logged size is different (smaller) than that of the edited nsswitch.conf. This results in a truncated nsswitch.conf if the mtree file is used with makefs to create a filesystem image, for example.
Comment 1 Brooks Davis freebsd_committer 2016-05-24 00:09:31 UTC
Eww.  This is definitely a bug.  nsswitch.conf should be generated under the all target  so the right thing can be installed.