Re: setuid root library?

Raja R Harinath (harinath@cs.umn.edu)
17 Jun 1996 19:37:18 -0500


Hasdi R Hashim <hasdi@engin.umich.edu> writes:
> Is there a way to load library in such a way that if you execute
> any functions in it, you'll execute it under supervisor mode? (of course
> the library has to have proper permission set? Is it useful to have such a
> beast? Any drawbacks? Is possible to it in userspace?

I'm not sure if you can. It would be a pain to implement it, I guess.

Have you considered running a setuid daemon, provide services via IPC.
You could probably also build a lightweight RPC (say, using shared
memory) to make the interface cleaner.

Maybe add this to the `libc' wish-list:
- Provide an unified RPC interface, and an implementation which detects
if the server is on the same machine, and uses a LW local RPC.

This may need a little bit of kernel support (or would it?)

- Hari

-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash