Subject: [RFC] PKG_USERVARS and PKG_GROUPVARS (was: installing as non-root?)
To: Georg Schwarz <georg.schwarz@freenet.de>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 10/09/2005 12:04:52
Georg Schwarz wrote:
> Is there a chance to install packages like comms/minicom that want to
> create their own users as non-root?
> Is there some reasonable way to force the use of the current user and
> group?
We could add a list of variables that contain user names. That way, in
unpriviledged mode, all those variables could be overwritten with the
local user:
PKG_USERVARS+= APACHE_USER
APACHE_USER?= www
PKG_GROUPVARS+= APACHE_GROUP
APACHE_GROUP?= www
OVERRIDE_USERGROUP?= yes
.if defined(UNPRIVILEDGED) && !empty(OVERRIDE_USERGROUP:M[Yy][Ee][Ss])
. for _u_ in ${PKG_USERVARS}
${_u_}= ${UNPRIVILEDGED_USER}
. endfor
. for _g_ in ${PKG_GROUPVARS)
${_g_}= ${UNPRIVILEDGED_GROUP}
. endfor
.endif
Roland