1 |
On Thu, 1 Nov 2007 15:43:18 +0100 |
2 |
Bernard Cafarelli <voyageur@g.o> wrote: |
3 |
|
4 |
> Le Wed, 31 Oct 2007 16:42:35 -0700 |
5 |
> Donnie Berkholz <dberkholz@g.o> a écrit: |
6 |
> |
7 |
> > On 19:49 Wed 31 Oct , Bernard Cafarelli (voyageur) wrote: |
8 |
> > > 1.1 |
9 |
> > > net-misc/nxserver-freenx/nxserver-freenx-0.7.1.ebuild |
10 |
> > > |
11 |
> > > file : |
12 |
> > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-freenx/nxserver-freenx-0.7.1.ebuild?rev=1.1&view=markup |
13 |
> > > plain: |
14 |
> > > 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 |
15 |
> > |
16 |
> > > pkg_postinst () { |
17 |
> > > usermod -s /usr/bin/nxserver nx || die "Unable to set |
18 |
> > > login shell of nx user!!" usermod -d ${NX_HOME_DIR} nx || die |
19 |
> > > "Unable to set home directory of nx user!!" |
20 |
> > |
21 |
> > This isn't safe with ROOT != / and it looks wrong too, you oughta |
22 |
> > be using enewuser for this stuff. |
23 |
> > |
24 |
> > Thanks, |
25 |
> > Donnie |
26 |
> > |
27 |
> |
28 |
> The problem is, enewuser can not be used to modify already existing |
29 |
> user accounts.This happens if another nxserver was installed before |
30 |
> (which uses the same account, but with different shell and home |
31 |
> directory). |
32 |
> |
33 |
> I'll fix ROOT handling in the meantime, this should be better: |
34 |
> usermod -s "${ROOT}"/usr/bin/nxserver nx |
35 |
> usermod -d "${ROOT}"{NX_HOME_DIR} nx |
36 |
|
37 |
Should it really? Wouldn't it modify /etc/passwd instead of the one in |
38 |
$ROOT, in which case it would actually be worse? |
39 |
Might be better to make it conditional on ROOT = /, and show a |
40 |
warning if ROOT != /, unless you can find a solution that is safe for |
41 |
ROOT != / |
42 |
|
43 |
Marius |
44 |
-- |
45 |
gentoo-dev@g.o mailing list |