* [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 [not found] <E1InJZb-0001mR-AE@stork.gentoo.org> @ 2007-10-31 23:42 ` Donnie Berkholz 2007-11-01 14:43 ` Bernard Cafarelli 0 siblings, 1 reply; 6+ messages in thread From: Donnie Berkholz @ 2007-10-31 23:42 UTC (permalink / raw To: gentoo-dev, voyageur 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 -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 6+ messages in thread
* [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 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 0 siblings, 1 reply; 6+ messages in thread From: Bernard Cafarelli @ 2007-11-01 14:43 UTC (permalink / raw To: gentoo-dev 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 Thanks, -- Bernard Cafarelli (Voyageur) NX and GNUstep Gentoo developer -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 6+ messages in thread
* 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 2007-11-01 14:43 ` Bernard Cafarelli @ 2007-11-01 15:06 ` Marius Mauch 2007-11-01 15:53 ` Bernard Cafarelli 0 siblings, 1 reply; 6+ messages in thread From: Marius Mauch @ 2007-11-01 15:06 UTC (permalink / raw To: gentoo-dev 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* 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 2007-11-01 15:06 ` Marius Mauch @ 2007-11-01 15:53 ` Bernard Cafarelli 2007-11-02 7:35 ` Mike Frysinger 0 siblings, 1 reply; 6+ messages in thread From: Bernard Cafarelli @ 2007-11-01 15:53 UTC (permalink / raw To: gentoo-dev Le Thu, 1 Nov 2007 16:06:51 +0100 Marius Mauch <genone@gentoo.org> a écrit: > 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 != / 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 != / 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! -- Bernard Cafarelli (Voyageur) NX and GNUstep Gentoo developer -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 6+ messages in thread
* 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 2007-11-01 15:53 ` Bernard Cafarelli @ 2007-11-02 7:35 ` Mike Frysinger 2007-11-02 13:17 ` Bernard Cafarelli 0 siblings, 1 reply; 6+ messages in thread From: Mike Frysinger @ 2007-11-02 7:35 UTC (permalink / raw To: gentoo-dev; +Cc: Bernard Cafarelli [-- Attachment #1: Type: text/plain, Size: 2666 bytes --] On Thursday 01 November 2007, Bernard Cafarelli wrote: > Le Thu, 1 Nov 2007 16:06:51 +0100 > > Marius Mauch <genone@gentoo.org> a écrit: > > 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-f > > > > >reenx/nxserver-freenx-0.7.1.ebuild?rev=1.1&view=markup plain: > > > > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-f > > > > >reenx/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 != / > > 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 != / 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 case, it'd make more sense i think to move the user account check to the init.d start() function and error out telling the user what to do instead of modifying things on them (which i think is bad form). see the cheesy check in openntpd's "ntpd" init.d script as an example. -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 827 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* 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 2007-11-02 7:35 ` Mike Frysinger @ 2007-11-02 13:17 ` Bernard Cafarelli 0 siblings, 0 replies; 6+ messages in thread From: Bernard Cafarelli @ 2007-11-02 13:17 UTC (permalink / raw To: gentoo-dev On Fri, 2 Nov 2007 03:35:35 -0400, Mike Frysinger <vapier@gentoo.org> wrote: > On Thursday 01 November 2007, Bernard Cafarelli wrote: >> Le Thu, 1 Nov 2007 16:06:51 +0100 >> >> Marius Mauch <genone@gentoo.org> a écrit: >> > 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-f >> > > > >reenx/nxserver-freenx-0.7.1.ebuild?rev=1.1&view=markup plain: >> > > > > > http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-f >> > > > >>reenx/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 != / >> >> 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 != / 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 > case, it'd make more sense i think to move the user account check to the > init.d start() function and error out telling the user what to do instead > of > modifying things on them (which i think is bad form). see the cheesy > check > in openntpd's "ntpd" init.d script as an example. > -mike nxserver-freeedition has one, however freenx only relies on ssh (connecting as nx user will start up the "server"). Unless I add one for freenx that only does the user checking (so all NX servers would include a init.d script). Another solution would be to fix and update the setup scripts from the NX servers themselves, but this is less portable... Bernard -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-11-02 13:16 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [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 2007-11-01 15:53 ` Bernard Cafarelli 2007-11-02 7:35 ` Mike Frysinger 2007-11-02 13:17 ` Bernard Cafarelli
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox