svn commit: r319357 - stable/11/share/mk
Eric van Gyzen
vangyzen at FreeBSD.org
Wed May 31 21:16:11 UTC 2017
Author: vangyzen
Date: Wed May 31 21:16:10 2017
New Revision: 319357
URL: https://svnweb.freebsd.org/changeset/base/319357
Log:
MFC r319022
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.
Sponsored by: Dell EMC
Modified:
stable/11/share/mk/bsd.init.mk
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/share/mk/bsd.init.mk
==============================================================================
--- stable/11/share/mk/bsd.init.mk Wed May 31 21:15:05 2017 (r319356)
+++ stable/11/share/mk/bsd.init.mk Wed May 31 21:16:10 2017 (r319357)
@@ -24,20 +24,12 @@ _uid!= id -u
.export _uid
.endif
.if ${_uid} != 0
-.if !defined(USER)
-# Avoid exporting USER
-.if !defined(_USER)
-_USER!= id -un
-.export _USER
-.endif
-USER= ${_USER}
-.endif
.if !defined(_gid)
_gid!= id -g
.export _gid
.endif
.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE
-$xOWN= ${USER}
+$xOWN= ${_uid}
$xGRP= ${_gid}
.endfor
.endif
More information about the svn-src-all
mailing list