I'd argue that you should be able to take over a pieceI'm trying to test my first resource manager.
On resmgr_attach() I get the error "Operation not permitted".
The manual states, that a resource manager has to be run as root
to be able to attach.
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 pathname space if all the resource managers who
already own that namespace agree that it is OK.
An attempt to do a resmgr_attach should result in a
message going in turn to each resource manager with
existing authority over that namespace, as with
any other request. The resource manager should
answer "yes", "no", or "don't care" to the resmgr_attach
request, much like the way opens work.
Default policy for resource managers would be "no",
but resource managers that implement file systems that
allow making directories could say "yes" if their permission
rules permitted making a directory at that point.
There's a problem with program launch trusting
permissions information from a resource manager, but
that can be settled by having program launch check
whether the resource manager that owns the object being
launched is trusted.
The "root" restriction on resmgr_attach is bad for security;
it results in code running as root that doesn't really have to
run as root. Only drivers that need hardware access
should have to run as root.
The whole business of how processes get linked up needs some
rethinking. The resource-manager structure is oriented
towards I/O; if you want to use QNX messages as transactions,
it's a bad fit. name_attach is useful, but the documentation
says it's deprecated. name_open doesn't yet work across the network.
(Even without "global names", it should be possible to open
"/net/NODENAME/dev/name/local/CONNECTIONNAME" when appropriate,
but that doesn't work, I'm told.) And I've mentioned in other messages,
inter-node spawn is buggy.
The end result is that building a distributed real-time system
is a huge pain. Messaging works fine once you set up the connnections,
but setting them up is a mess.