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 1IncOc-0004ue-B9 for garchives@archives.gentoo.org; Thu, 01 Nov 2007 15:55:50 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id lA1Fsw0n005882; Thu, 1 Nov 2007 15:54:58 GMT Received: from farragut.cafarelli.fr (farragut.cafarelli.fr [88.191.27.4]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id lA1Fr93H003633 for ; Thu, 1 Nov 2007 15:53:09 GMT Received: from enterprise.cafarelli.fr (voyageur.cafarelli.fr [82.67.159.41]) by farragut.cafarelli.fr (Postfix) with ESMTP id 23DD8224BD8 for ; Thu, 1 Nov 2007 16:56:31 +0100 (CET) Date: Thu, 1 Nov 2007 16:53:07 +0100 From: Bernard Cafarelli 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: <20071101165307.77e527bb@enterprise.cafarelli.fr> In-Reply-To: <20071101160651.f1195318.genone@gentoo.org> References: <20071031234235.GU30328@supernova> <20071101154318.0c351459@enterprise.cafarelli.fr> <20071101160651.f1195318.genone@gentoo.org> Organization: Gentoo Foundation, Inc. X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.1; x86_64-pc-linux-gnu) 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=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: d62492e9-5d6e-497b-a5b2-30f0d4919b8f X-Archives-Hash: 6b77b375e80cd830fd7dc85a08b4cb4f Le Thu, 1 Nov 2007 16:06:51 +0100 Marius Mauch a =C3=A9crit: > On Thu, 1 Nov 2007 15:43:18 +0100 > Bernard Cafarelli wrote: >=20 > > Le Wed, 31 Oct 2007 16:42:35 -0700 > > Donnie Berkholz a =C3=A9crit: > >=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-f= reenx/nxserver-freenx-0.7.1.ebuild?rev=3D1.1&view=3Dmarkup > > > > plain: > > > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-f= reenx/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 >=20 > 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 / Yes, as pointed out on IRC by zlin, this does not fix the problem at all (and make it a little worse!).=20 Making it conditional on ROOT !=3D / is a good workaround in the meantime: not breaking anything in all cases, and as the problem only appears if a different nxserver was installed before, it still works in most cases. Thanks! --=20 Bernard Cafarelli (Voyageur) NX and GNUstep Gentoo developer -- gentoo-dev@gentoo.org mailing list