From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1InbhI-0003E4-Bk for garchives@archives.gentoo.org; Thu, 01 Nov 2007 15:11:04 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id lA1FABqT029635; Thu, 1 Nov 2007 15:10:11 GMT Received: from mail.genone.homeip.net (dslb-082-083-013-137.pools.arcor-ip.net [82.83.13.137]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id lA1F8Vjv027487 for ; Thu, 1 Nov 2007 15:08:31 GMT Received: by mail.genone.homeip.net (Postfix, from userid 460) id C8C7D281E0; Thu, 1 Nov 2007 16:06:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr0-genone_0.7 (2007-02-13) on lyta.genone.homeip.net X-Spam-Level: X-Spam-Status: No, score=-3.5 required=7.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8-gr0-genone_0.7 Received: from sheridan (unknown [192.168.0.40]) by mail.genone.homeip.net (Postfix) with SMTP id 09D2628185 for ; Thu, 1 Nov 2007 16:06:32 +0100 (CET) Date: Thu, 1 Nov 2007 16:06:51 +0100 From: Marius Mauch To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/nxserver-freenx: nxserver-freenx-0.7.0-r1.ebuild ChangeLog nxserver-freenx-0.7.1.ebuild Message-Id: <20071101160651.f1195318.genone@gentoo.org> In-Reply-To: <20071101154318.0c351459@enterprise.cafarelli.fr> References: <20071031234235.GU30328@supernova> <20071101154318.0c351459@enterprise.cafarelli.fr> X-Mailer: Sylpheed 2.4.1 (GTK+ 2.10.11; i686-pc-mingw32) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 7c3b9129-6008-455e-a5e6-ff20975cabeb X-Archives-Hash: eecadf8680ef4e07abdf1fc6d35fecba On Thu, 1 Nov 2007 15:43:18 +0100 Bernard Cafarelli wrote: > Le Wed, 31 Oct 2007 16:42:35 -0700 > Donnie Berkholz a =E9crit: >=20 > > On 19:49 Wed 31 Oct , Bernard Cafarelli (voyageur) wrote: > > > 1.1 > > > net-misc/nxserver-freenx/nxserver-freenx-0.7.1.ebuild > > >=20 > > > file : > > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-fre= enx/nxserver-freenx-0.7.1.ebuild?rev=3D1.1&view=3Dmarkup > > > plain: > > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-fre= enx/nxserver-freenx-0.7.1.ebuild?rev=3D1.1&content-type=3Dtext/plain > >=20 > > > pkg_postinst () { > > > usermod -s /usr/bin/nxserver nx || die "Unable to set > > > login shell of nx user!!" usermod -d ${NX_HOME_DIR} nx || die > > > "Unable to set home directory of nx user!!" > >=20 > > This isn't safe with ROOT !=3D / and it looks wrong too, you oughta > > be using enewuser for this stuff. > >=20 > > Thanks, > > Donnie > >=20 >=20 > The problem is, enewuser can not be used to modify already existing > user accounts.This happens if another nxserver was installed before > (which uses the same account, but with different shell and home > directory).=20 >=20 > I'll fix ROOT handling in the meantime, this should be better: > usermod -s "${ROOT}"/usr/bin/nxserver nx > usermod -d "${ROOT}"{NX_HOME_DIR} nx Should it really? Wouldn't it modify /etc/passwd instead of the one in $ROOT, in which case it would actually be worse? Might be better to make it conditional on ROOT =3D /, and show a warning if ROOT !=3D /, unless you can find a solution that is safe for ROOT !=3D / Marius -- gentoo-dev@gentoo.org mailing list