login on serial port

Kris Warkentin <kewarken@qnx.com> wrote:

Scripts can’t be suid. I believe phlogin should be suid root. I’m not
really sure what the problem is since, if tinit is running as root, when it
launches ph, there should be no problem.

There’s no need for phlogin to be setuid root: phlogin must be started
by Photon, and Photon is setuid root.

I think the problem with renice is that the OS only allows you to change
the priority of a process whose real or effective user ID matches yours.
If you run ph from command line, the input driver runs with your real
user ID; if you start Photon from sysinit, drivers run with root’s real
user ID, and phlogin doesn’t change that.

Kris

“ed1k” <> ed1k@spamerstrap.com> > wrote in message
news:01c1d179$0bdd8740$106fa8c0@ED1K…
Hm…, yes, it’s permission thing. I did not change attribute/owner of
‘ph’, just added some
‘renice’ commands into script. I believe ‘ph’ has setted ‘set uid on
execution’ bit by the fresh
installation. Where is problem? Any user can do login on any console and
then type ‘ph’ to be in
Photon (I use ‘nophoton’ file). Without ‘nophoton’ (i.e ‘tinit -p’
executed), only root can do
phlogin to be in right Photon. Any other user will get Photon with jumping
mouse and other unwanted
stuff > :wink:> . Heh, I know the unwanted stuff in QNXRTP is the problem of my
old and slow hardware
(p166mmx, 430VX, 64mb, serial old fashion mitsumi mouse - all work
perfectly in NT4SP6), but some
'renice’s do the trick for me. The only thing which I don’t understand
now, why any already loged
in user execute ‘ph’ without problem, and the same script does not work
when it launched by
‘tinit’?

Eduard.
ed1k at ukr dot net

Kris Warkentin <> kewarken@qnx.com> > wrote in article
a7d0bo$68o$> 1@nntp.qnx.com> >…
tinit isn’t doing anything particularily tricky with ‘-p’. It just goes
‘/bin/sh -c ph’ on /dev/con1. Perhaps it’s a permission/uid thing?

Kris

“ed1k” <> ed1k@spamerstrap.com> > wrote in message
news:01c1d0e3$c194e9c0$106fa8c0@ED1K…
Thank you Kris,

There was another problem with tinit (I guess):
I need renice my mouse, so I include some extra commands in ‘ph’
script.
It works fine while I’m
loged in text mode and then type ‘ph’. But if I use ‘tinit -P’ to boot
into Photon, the ‘ph’ has no
permissions to renice mouse. Is it solved? Or is it ‘Photon’'s issue?
In
other words, all work
great if ‘phlogin’ accept root’s account. And it doesn’t work if
non-root
is loged in by ‘phlogin’.
Did you look at “-P” branch of ‘tinit’?

Eduard.
ed1k at yahoo dot com

Kris Warkentin <> kewarken@qnx.com> > wrote in article
a7cmiu$s29$> 1@nntp.qnx.com> >…
Yeah. You’re probably right. I haven’t heard back as to whether
they
want
to include this in 6.2 or not so I’ll just attach this version of
tinit.
Let me know how it works.

cheers,

Kris
\


Wojtek Lerch QNX Software Systems Ltd.

Wojtek Lerch <wojtek_l@yahoo.ca> wrote:

There’s no need for phlogin to be setuid root: phlogin must be started
by Photon, and Photon is setuid root.

Actually, it doesn’t even matter that Photon is setuid root: Photon will
refuse to start phlogin unless its real user ID is root.


Wojtek Lerch QNX Software Systems Ltd.

Hi Kris,
Excuse me but I didn't understand what is this 'tinit.dat' file!

thanks,
Alain.

Kris Warkentin wrote:
Yeah.  You're probably right.  I haven't heard back as to whether they want
to include this in 6.2 or not so I'll just attach this version of tinit.
Let me know how it works.

cheers,

Kris
"Pavol Kycina" <> wrote in message
news:3c999aa5$<1@asrpx.mshdo>...
"Kris Warkentin" <> wrote in message
news:a77n27$4qh$<1@nntp.qnx.com>...
If someone really needs it, I could I suppose but since the work around
is
so easy (stty +edit < /dev/ser1), I didn't really plan on it.

I think this work-around is only partial. If someone succesfully logs in,
then makes some changes to settings of serial line (for example switches
to
raw mode), and then logs out without switching back to edit mode, he would
face the original problem.

Any hint?

Pavol Kycina








It’s probably your mail-reader misbehaving. I had attached a x86 binary of tinit which fixes the problem. You could probably just save it, rename it and run it. fingers crossed :wink:

Kris

“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message news:3C9ED8B6.40002@icbt.com
Hi Kris,
Excuse me but I didn’t understand what is this ‘tinit.dat’ file!

thanks,
Alain.

Kris Warkentin wrote:

Yeah. You’re probably right. I haven’t heard back as to whether they wantto include this in 6.2 or not so I’ll just attach this version of tinit.Let me know how it works.cheers,Kris"Pavol Kycina" <kycina@microstep-hdo.sk> wrote in messagenews:3c999aa5$1@asrpx.mshdo
“Kris Warkentin” <kewarken@qnx.com> wrote in messagenews:a77n27$4qh$1@nntp.qnx.com
If someone really needs it, I could I suppose but since the work around
is
so easy (stty +edit < /dev/ser1), I didn’t really plan on it.
I think this work-around is only partial. If someone succesfully logs in,then makes some changes to settings of serial line (for example switches
to
raw mode), and then logs out without switching back to edit mode, he wouldface the original problem.Any hint?Pavol Kycina