--- games.eclass.orig 2010-04-17 23:24:46.000000000 +0200 +++ games.eclass.orig 2010-04-17 23:24:56.000000000 +0200 @@ -28,7 +28,7 @@ export GAMES_BINDIR=${GAMES_BINDIR:-${GA export GAMES_ENVD="90games" # if you want to use a different user/group than games.games, # just add these two variables to your environment (aka /etc/profile) -export GAMES_USER=${GAMES_USER:-root} +export GAMES_USER=${GAMES_USER:-0} export GAMES_USER_DED=${GAMES_USER_DED:-games} export GAMES_GROUP=${GAMES_GROUP:-games} @@ -85,10 +85,10 @@ prepgamesdirs() { # common trees should not be games owned #264872 if [[ ${dir} == "${GAMES_PREFIX_OPT}" ]] ; then - fowners root:root "${dir}" + fowners 0:0 "${dir}" fperms 755 "${dir}" for d in $(get_libdir) bin ; do - fowners root:root "${dir}/${d}" + fowners 0:0 "${dir}/${d}" fperms 755 "${dir}/${d}" done fi @@ -125,9 +125,10 @@ games_pkg_setup() { [[ ${GAMES_CHECK_LICENSE} == "yes" ]] && check_license ${LICENSE} enewgroup "${GAMES_GROUP}" 35 - [[ ${GAMES_USER} != "root" ]] \ + local superuser=$(egetent passwd 0 | cut -f1 -d:) + [[ ${GAMES_USER} != 0 && ${GAMES_USER} != ${superuser} ]] \ && enewuser "${GAMES_USER}" 35 -1 "${GAMES_PREFIX}" "${GAMES_GROUP}" - [[ ${GAMES_USER_DED} != "root" ]] \ + [[ ${GAMES_USER_DED} != 0 && ${GAMES_USER_DED} != ${superuser} ]] \ && enewuser "${GAMES_USER_DED}" 36 /bin/bash "${GAMES_PREFIX}" "${GAMES_GROUP}" # Dear portage team, we are so sorry. Lots of love, games team.