The idea is to protect again user that are NOT root.
resourge manager don’t really know if you (the person) is really root
I don’t get your point yet.
An additional drawback is, that I get used to do all my work on the system
as root.
When however the protection would be based on access rigths on the parent
directory,
the SysAdmin has still to trust me, but he is not forced to give the root
password away.
Indeed he would’nt need to give you root password if it was based on access
rights only, be he should be worried because once started the resource
manager would be able to change the root password -)
But I do see were you could be confuse. You are probably lacking some
knowledge about how resource manager works.
Let’s say resource manager ability to resmgr_attach was based upon parent’s
permission. Your email me your ram disk driver that you just written. I
start it and mount the device under /u/mcharest/ramdrv hence don’t need to
be root cause it’s mounted under my home directory. It’s sounds as if
everything is secure, but it’s not. I run “cp /bin/dinit
/u/mcharest/ramdrv” copy dinit in your resmgr space. Then I tried chmod +s
/bin/dnit/u/mcharest/ramdrv and suprise it works. Why because you could
have forget to prevent +s flag from being set for non root user. Then me
“the non root user” is able to dinit /dev/hd0.0 hence deleting the content
of the HD… Here we are talking about a honest mistake. But it could be
done on purpuse be a malicious user.
You give me telnet/ftp access to you machine. Then I upload my own ram
driver which concidently allow setuid flag to be by non user (or even
reports all files have the setuid flag set) then i could easly take you
machine apart, read your personel files. So even if you’d be root you could
not prevent me from hacking your machine, well you could prevent me from
running any program at all from /u/mcharest or being able to write via ftp.
I would be close to impossible to make your system secure.
See aside from resmgr_attach there is no other check or validation that
resmgr have to comply with, they are responsible to comply OR NOT with all
the permissions stuff. Yes resmgr could check upon the permission of the
parent directory and enforces these same permission, but there is no
mecanism to force them to do so. Thus they cannot be allow to be run by any
other user then root. It’s up to the admin to decide if a program is to be
trusted or not! It’s not up to YOU the non root user. That limitation on
resmgr_attach ensure that the decision is left to root only.
More info. When you do ls /ramdrv (assuming /ramdrv is your resmgr) what is
returned to the ls command by your resmgr is 100% generated by your resmgr
and doesn’t go through any checking by the OS. Hence if the /ramdrv says
the setuid flag is set the program that reads it (being ls or the loader)
doesn’t do any other checking (and why would he has to) to see if the
program responsible for /ramdrv does indeed have the proper rights to return
that flag.
That being said this whole issue raises the question, if there is value in
allowing non root user to resmgr_attach (I think there are). For example I
could write a random number generator, why would it need to be run as root.
But given the way the resmgr framework and the OS is architeched I don’t see
how it could be done.
Making it otherwise would render the OS complexe IHMO (
The same is true, if I’m debugging remotely or local via qconn.
On the other hand, when writing a RM
I can take care to protect the system so that no user of the RM can
use
it
as a backdoor.
Werner
This way, I can’t take over all of the pathname space, only where
I
have write permission.
Well, started as root it works.
Why does it have this restriction?
IMHO it would be much more flexible,
if resmgr_attach() could respect the permissions
of the parent directory, where the new name is attached to.
I want to debug my resource managers
in a Neutrino based self hosted environement (Momentics PE
6.2.1b),
With this restriction I have to do it as root,
otherwise I’m not able to test my programms
directly from inside the IDE.
\