mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
bsd.init.mk: always define _gid when MK_INSTALL_AS_USER is set
A recent commit started to use _uid and _gid in <bsd.dirs.mk> to
mangle the user and group for newly installed directories when
MK_INSTALL_AS_USER is set. However, _gid was previously only set
when _uid was not 0, causing the group to be set to the empty
string.
Set _uid and _gid together to avoid this problem.
Fixes: 541e6e2d51
PR: 297841
Reviewed by: emaste, imp
Reported by: Ralph Zitz <[email protected]>
Differential Revision: https://reviews.freebsd.org/D59150
This commit is contained in:
1 parent
067ae9850f
commit
9496457f23
1 file changed
+1
-1
@@ -32,11 +32,11 @@ OBJS_SRCS_FILTER+= R
|
||||
_uid!= id -u
|
||||
.export _uid
|
||||
.endif
|
||||
.if ${_uid} != 0
|
||||
.if !defined(_gid)
|
||||
_gid!= id -g
|
||||
.export _gid
|
||||
.endif
|
||||
.if ${_uid} != 0
|
||||
.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE
|
||||
$xOWN= ${_uid}
|
||||
$xGRP= ${_gid}
|
||||
|
||||
Reference in new issue
Block a user