Gentoo Archives: gentoo-dev

From: Bernard Cafarelli <voyageur@g.o>
To: gentoo-dev@l.g.o
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: Thu, 01 Nov 2007 15:55:50
Message-Id: 20071101165307.77e527bb@enterprise.cafarelli.fr
In Reply to: 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 by Marius Mauch
1 Le Thu, 1 Nov 2007 16:06:51 +0100
2 Marius Mauch <genone@g.o> a écrit:
3
4 > On Thu, 1 Nov 2007 15:43:18 +0100
5 > Bernard Cafarelli <voyageur@g.o> wrote:
6 >
7 > > Le Wed, 31 Oct 2007 16:42:35 -0700
8 > > Donnie Berkholz <dberkholz@g.o> a écrit:
9 > >
10 > > > On 19:49 Wed 31 Oct , Bernard Cafarelli (voyageur) wrote:
11 > > > > 1.1
12 > > > > net-misc/nxserver-freenx/nxserver-freenx-0.7.1.ebuild
13 > > > >
14 > > > > file :
15 > > > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-freenx/nxserver-freenx-0.7.1.ebuild?rev=1.1&view=markup
16 > > > > plain:
17 > > > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-freenx/nxserver-freenx-0.7.1.ebuild?rev=1.1&content-type=text/plain
18 > > >
19 > > > > pkg_postinst () {
20 > > > > usermod -s /usr/bin/nxserver nx || die "Unable to set
21 > > > > login shell of nx user!!" usermod -d ${NX_HOME_DIR} nx || die
22 > > > > "Unable to set home directory of nx user!!"
23 > > >
24 > > > This isn't safe with ROOT != / and it looks wrong too, you oughta
25 > > > be using enewuser for this stuff.
26 > > >
27 > > > Thanks,
28 > > > Donnie
29 > > >
30 > >
31 > > The problem is, enewuser can not be used to modify already existing
32 > > user accounts.This happens if another nxserver was installed before
33 > > (which uses the same account, but with different shell and home
34 > > directory).
35 > >
36 > > I'll fix ROOT handling in the meantime, this should be better:
37 > > usermod -s "${ROOT}"/usr/bin/nxserver nx
38 > > usermod -d "${ROOT}"{NX_HOME_DIR} nx
39 >
40 > Should it really? Wouldn't it modify /etc/passwd instead of the one in
41 > $ROOT, in which case it would actually be worse?
42 > Might be better to make it conditional on ROOT = /, and show a
43 > warning if ROOT != /, unless you can find a solution that is safe for
44 > ROOT != /
45
46 Yes, as pointed out on IRC by zlin, this does not fix the problem at
47 all (and make it a little worse!).
48
49 Making it conditional on ROOT != / is a good workaround in the
50 meantime: not breaking anything in all cases, and as the problem only
51 appears if a different nxserver was installed before, it still works in
52 most cases. Thanks!
53
54 --
55 Bernard Cafarelli (Voyageur)
56 NX and GNUstep Gentoo developer
57 --
58 gentoo-dev@g.o mailing list

Replies