public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Marius Mauch <genone@gentoo.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: Thu, 1 Nov 2007 16:06:51 +0100	[thread overview]
Message-ID: <20071101160651.f1195318.genone@gentoo.org> (raw)
In-Reply-To: <20071101154318.0c351459@enterprise.cafarelli.fr>

On Thu, 1 Nov 2007 15:43:18 +0100
Bernard Cafarelli <voyageur@gentoo.org> wrote:

> Le Wed, 31 Oct 2007 16:42:35 -0700
> Donnie Berkholz <dberkholz@gentoo.org> a écrit:
> 
> > 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-freenx/nxserver-freenx-0.7.1.ebuild?rev=1.1&view=markup
> > > plain:
> > > 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
> > 
> > > 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 != / 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 = /, and show a
warning if ROOT != /, unless you can find a solution that is safe for
ROOT != /

Marius
--
gentoo-dev@gentoo.org mailing list



  reply	other threads:[~2007-11-01 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1InJZb-0001mR-AE@stork.gentoo.org>
2007-10-31 23:42 ` [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 Donnie Berkholz
2007-11-01 14:43   ` Bernard Cafarelli
2007-11-01 15:06     ` Marius Mauch [this message]
2007-11-01 15:53       ` Bernard Cafarelli
2007-11-02  7:35         ` Mike Frysinger
2007-11-02 13:17           ` Bernard Cafarelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071101160651.f1195318.genone@gentoo.org \
    --to=genone@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox