HomeFreeBSD

Fix INSTALL_AS_USER with external nsswitch databases

Description

Fix INSTALL_AS_USER with external nsswitch databases

The INSTALL_AS_USER option tells "install" to use the current
user name as the owner of the installed file. The "install"
command executed by the build is statically linked, so it does not
load nsswitch modules, such as nss_ldap.so, so it fails when
the user is only defined in such a database.

Fix it to use the current UID instead of user name. This works
for all users. I expect it is also slightly more efficient.

Reviewed by: sjg
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10862

Details

Provenance
vangyzenAuthored on
Reviewer
sjg
Differential Revision
D10862: Fix INSTALL_AS_USER with external nsswitch databases
Parents
rS319021: MFC r316131:
Branches
Unknown
Tags
Unknown