Re: Proposal: Hotkey-handling with kerneld

Gonzalo Tornaria (gtornari@varela.reu.edu.uy)
Wed, 15 May 96 2:56:53 GMT


On May 01, 22:09, Martin Buck <martin-2.buck@student.uni-ulm.de> wrote:

>> I've done this... I still use system() (directly!), but I'm
>> planning to change it to fork()/exec() (it should be better,
>> shouldn't it?). Unless there is a good reason to keep using
>> system(). The new version is like the other
>> in <http://www.cmat.edu.uy/~tornaria/consoled/>

> system() might not be a problem because conseld doesn't run
> setuid, but we need to do a fork() anyway, so there's probably no
> reason to use system().

What's the problem with setuid vs. system()? Setuid or not, consoled has
to be run as root!

You are rigth about the fork(), the new version (0.02) does that rigth. It
fork()s for each request, although It still uses system(). It has some more
improvements too (use /var/run/consoled.pid, syslog, AND changes the kernel
patch to send a struct with all the info available.

> But it might be useful to be able to control whether the
> hotkey-handlers should be run with uid 0 or some unpriviledged uid
> in consoled's config-file.

That's good. I will do it when I have time to rethink a bit the config
file, for this and other things I have in mind.

What is important now is to think if the kernel side is fine (I think so),
and send the patch to Linus, to include it in 2.0. The user mode side is not so
important, it could be modified anytime.

Saludos,
Gonzalo