diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2017-01-21 06:55:53 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2017-01-21 06:55:53 +0000 |
commit | eed95b1d5c2470bf95a933f13299378b945bd6ea (patch) | |
tree | 7e4b0a6ae4e3dc4da0cd648ced570a53af2d7e9b /share/mk/bsd.obj.mk | |
parent | 38f7b231aa8f04d1117a25479ff95f9777bd9698 (diff) |
Only do chown :wobj when this command will succeed. Allows using
bsd.prog.mk outside /usr/src by users not belonging to group wobj.
Requested by many after a report by Sebastien Marie.
ok deraadt
Diffstat (limited to 'share/mk/bsd.obj.mk')
-rw-r--r-- | share/mk/bsd.obj.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk index 1635d7cd8d3..d5261661e49 100644 --- a/share/mk/bsd.obj.mk +++ b/share/mk/bsd.obj.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.obj.mk,v 1.16 2016/11/19 14:20:58 tb Exp $ +# $OpenBSD: bsd.obj.mk,v 1.17 2017/01/21 06:55:52 tb Exp $ # $NetBSD: bsd.obj.mk,v 1.9 1996/04/10 21:08:05 thorpej Exp $ .if !target(obj) @@ -27,7 +27,7 @@ obj! _SUBDIRUSE }; \ MKDIRS=_mkdirs; \ fi; \ - elif [[ $$here == $$subdir ]]; then \ + elif [[ `id` == *'('${WOBJGROUP}')'* && $$here == $$subdir ]]; then \ SETOWNER="chown :${WOBJGROUP}"; \ else \ SETOWNER=:; \ |