diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-12-31 14:11:39 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-12-31 14:11:39 +0000 |
commit | 96584bb7ae9662f2f731ae449155134bdc09bb9f (patch) | |
tree | 35ea259fe79b88666eaeae0d31c3e8183c39e5a4 /eclass | |
parent | Use -1 instead of /bin/false as default shell. (diff) | |
download | gentoo-2-96584bb7ae9662f2f731ae449155134bdc09bb9f.tar.gz gentoo-2-96584bb7ae9662f2f731ae449155134bdc09bb9f.tar.bz2 gentoo-2-96584bb7ae9662f2f731ae449155134bdc09bb9f.zip |
make sure people use -1 and not /bin/false as default nologin shells
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/eutils.eclass | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 06d70143a82f..3d9bdd05b4e1 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.220 2005/12/13 14:08:29 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.221 2005/12/31 14:11:39 vapier Exp $ # # Author: Martin Schlemmer <azarah@gentoo.org> # @@ -486,9 +486,13 @@ enewuser() { # handle shell local eshell=$1; shift if [[ ! -z ${eshell} ]] && [[ ${eshell} != "-1" ]] ; then - if [[ ! -e ${eshell} ]] ; then + if [[ ! -e ${ROOT}${eshell} ]] ; then eerror "A shell was specified but it does not exist !" - die "${eshell} does not exist" + die "${eshell} does not exist in ${ROOT}" + fi + if [[ ${eshell} == */false || ${eshell} == */nologin ]] ; then + eerror "Do not specify ${eshell} yourself, use -1" + die "Pass '-1' as the shell parameter" fi else for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do |