diff options
author | obache <obache@pkgsrc.org> | 2013-02-22 13:35:27 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2013-02-22 13:35:27 +0000 |
commit | fc8ec3bd06c6c0073d1a855c35ed8bec234555d6 (patch) | |
tree | a871629a6a1bcced5cf9495d908ab0d6bbadbe68 /mk | |
parent | 965a8efaa3678c771ffa4e65fb0afcac55bcc4b7 (diff) | |
download | pkgsrc-fc8ec3bd06c6c0073d1a855c35ed8bec234555d6.tar.gz |
Allow to overwrite commnand of privilege check as _IS_ROOT_CMD.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 2d29b4dd605..c58a9ddf6f2 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1986 2013/02/21 13:33:10 obache Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1987 2013/02/22 13:35:27 obache Exp $ # # This file is in the public domain. # @@ -99,6 +99,7 @@ SVR4_PKGNAME?= ${PKGNAME} WRKSRC?= ${WRKDIR}/${DISTNAME} # Override for SU_CMD user check +_IS_ROOT_CMD?= ${TEST} `${ID} -u` = `${ID} -u ${_SU_ROOT_USER}` _SU_ROOT_USER?= ${ROOT_USER} REAL_ROOT_USER?= ${ROOT_USER} REAL_ROOT_GROUP?= ${ROOT_GROUP} @@ -616,7 +617,7 @@ su-target: .USE "") ;; \ *) ${PRE_CMD.su-${.TARGET}} ;; \ esac; \ - if ${TEST} `${ID} -u` = `${ID} -u ${_SU_ROOT_USER} 2>/dev/null || ${ECHO} ${_SU_ROOT_USER}`; then \ + if ${_IS_ROOT_CMD}; then \ ${_ROOT_CMD}; \ else \ case ${PRE_ROOT_CMD:Q}"" in \ |