Can anyone tell me how to use the privity flag (-T for cc compiler) with
qcc?
I need to grant motor controller card access to a non-root user and,
from what I’ve read, believe that such access can be granted by
compiling (linking?) my program with a different privity setting (i.e.
-T 1). If there’s another way to do this, that would be appreciated
too. Thanks!!
Neville
“Neville Bonwit” <neville@erg.sri.com> wrote in message
news:3BEAAA04.29576D7B@erg.sri.com…
Can anyone tell me how to use the privity flag (-T for cc compiler) with
qcc?
With QNX6 this flag is turn on by a call to the ThreadCtl done within
the program. It’s not perform at link time, but rather at run time.
I need to grant motor controller card access to a non-root user and,
from what I’ve read, believe that such access can be granted by
compiling (linking?) my program with a different privity setting (i.e.
-T 1).
A program that ask to for hardware access ( via ThreadCtl) , must be run as
root.
A work around is to set the setuid for the executable (chmod +s …).
If there’s another way to do this, that would be appreciated
too. Thanks!!
Yes the “clean” way of doing this is to write a device driver that runs
under
root and have non-root program (client) access the hardware through
that device driver.
Neville
- Mario
“Jesus may have turn water into wine, but I can turn an apple into shit.”
Ok. Thanks to all for the privity advice!
Neville
Operating System Tech Support wrote:
“Neville Bonwit” <> neville@erg.sri.com> > wrote in message
news:> 3BEAAA04.29576D7B@erg.sri.com> …
Can anyone tell me how to use the privity flag (-T for cc compiler) with
qcc?
I need to grant motor controller card access to a non-root user and,
from what I’ve read, believe that such access can be granted by
compiling (linking?) my program with a different privity setting (i.e.
-T 1). If there’s another way to do this, that would be appreciated
too. Thanks!!
If the process is running as a regualar user (with user priveledges) you
won’t be able to gain IO privity using the -T flag. It needs to run as root
(or with root privledges), in addition to requesting IO privity.
-Adam
“Neville Bonwit” <neville@erg.sri.com> wrote in message
news:3BEAAA04.29576D7B@erg.sri.com…
Can anyone tell me how to use the privity flag (-T for cc compiler) with
qcc?
I need to grant motor controller card access to a non-root user and,
from what I’ve read, believe that such access can be granted by
compiling (linking?) my program with a different privity setting (i.e.
-T 1). If there’s another way to do this, that would be appreciated
too. Thanks!!
If the process is running as a regualar user (with user priveledges) you
won’t be able to gain IO privity using the -T flag. It needs to run as root
(or with root privledges), in addition to requesting IO privity.
-Adam