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 1Inr7S-0004wM-NG for garchives@archives.gentoo.org; Fri, 02 Nov 2007 07:39:07 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id lA27bUJW006855; Fri, 2 Nov 2007 07:37:30 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id lA27ZbQE004587 for ; Fri, 2 Nov 2007 07:35:37 GMT Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 93220656E9; Fri, 2 Nov 2007 07:35:36 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org 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 Date: Fri, 2 Nov 2007 03:35:35 -0400 User-Agent: KMail/1.9.7 Cc: Bernard Cafarelli References: <20071101160651.f1195318.genone@gentoo.org> <20071101165307.77e527bb@enterprise.cafarelli.fr> In-Reply-To: <20071101165307.77e527bb@enterprise.cafarelli.fr> 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: multipart/signed; boundary="nextPart1630329.tph19MGbDK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200711020335.35988.vapier@gentoo.org> X-Archives-Salt: 4bd30284-2388-44c1-81c8-d4df66bd04ef X-Archives-Hash: 7cd9f453a0ab7f263ddddc5b3932a6f7 --nextPart1630329.tph19MGbDK Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 01 November 2007, Bernard Cafarelli wrote: > 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: > > > Le Wed, 31 Oct 2007 16:42:35 -0700 > > > > > > Donnie Berkholz a =C3=A9crit: > > > > On 19:49 Wed 31 Oct , Bernard Cafarelli (voyageur) wrote: > > > > > 1.1 > > > > > net-misc/nxserver-freenx/nxserver-freenx-0.7.1.ebuild > > > > > > > > > > file : > > > > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver= =2Df > > > > >reenx/nxserver-freenx-0.7.1.ebuild?rev=3D1.1&view=3Dmarkup plain: > > > > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver= =2Df > > > > >reenx/nxserver-freenx-0.7.1.ebuild?rev=3D1.1&content-type=3Dtext/p= lain > > > > > > > > > > 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!!" > > > > > > > > This isn't safe with ROOT !=3D / and it looks wrong too, you oughta > > > > be using enewuser for this stuff. > > > > > > > > Thanks, > > > > Donnie > > > > > > 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). > > > > > > 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 / > > Yes, as pointed out on IRC by zlin, this does not fix the problem at > all (and make it a little worse!). > > 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! presumably you have init.d scripts which would start the daemons ? in that= =20 case, it'd make more sense i think to move the user account check to the=20 init.d start() function and error out telling the user what to do instead o= f=20 modifying things on them (which i think is bad form). see the cheesy check= =20 in openntpd's "ntpd" init.d script as an example. =2Dmike --nextPart1630329.tph19MGbDK Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iQIVAwUARyrTR0FjO5/oN/WBAQLd+hAA0U85q9ruL6yUikUbiTqNevl0KQtQnEL5 8x64+dOzTUp6aQT/IdqqoT0uZoeG+V1ns9Co5DuQdeZRu1fjlIv28qR5Qb4PSi7k 4DZfqfPTKLfvsvCpErnk+k5iK3/0eK95p9E0FNofp+eAAhsytpm+/9nzs8i3oqfY VH9MBDgmSvvOIWF05a3KF0oizYZr9hFW55wU7ORcbTovobzQ1WjltghS+Bd/bS57 EZbDOTgU8sKPsZHrg03cRqVfSrq23M+yStKrZLCw5I7Saj81zmcghK8QInTUoK2z /CIyb8+s/CW4szaIXIsj7UKzXZGE9dAETHQvfP5KUMrUc6d+p8iCGyXabeBtE3JR yjrZuCo+9spEBWgY6l7X5lhLgX9VSg0cB0uR6JZ/GDfmJCIGfWObTb7GPivB8WNs BqGs9qYtVkDGKXvlewQOSZ/e2qPGVHNjDIYNGFn754p8N5lURQNqq3151+BGm/sL 8AqWR9Q8XITaNzFVkbMkqveVOEQF8BVVodhHnlXTpqqIpLCdU88W3mqTa7fqwkzt 9pHuCVhcKIYnIG3qZTjfLrhbpf7V0xExm1t+Z/Zcj70lUxC2Ml66YUnQPNgR/5WH vYQ6qZwc4j0dCQLX18HzYDv+2ejtN+5eaOaPWGZ4W75wlSpYLrVK3NgbqYJvFW/E Gh9eq+FkPo8= =Djrb -----END PGP SIGNATURE----- --nextPart1630329.tph19MGbDK-- -- gentoo-dev@gentoo.org mailing list