Am 19. Jul 2007 um 12:16 schrieb Tomas Hajny:

Marco van de Voort wrote:
Op Wed, 18 Jul 2007, schreef Michael Van Canneyt:
Under the assumption a setuid root program is the only possible
option:

The safest - and in my opinion only correct - way is to write a small
setuid
root program which sets the proper TTY stuff, and then executes the
IDE as
the normal user.

The program can easily be audited, as it'll be maybe 50 lines of
code...

If the user switches VT, the keyboard needs to be unpatched. So this
approach won't fully work. However, a solution that can work is to make the keyboard unit execute a setuid root helper to which it communicates
through a pipe.

This would introduce quite some linux specific code on a lot of already
complicated points to the IDE.

I'm not so sure - refreshing the keyboard and video status after coming
back from a spawned program or shell should be provided as a standard
functionality within InitKeyboard and InitVideo calls, shouldn't it?

Last time i tried I was not able to get the state the terminal is in, for example white on black or black on white. Consequently, you can only reset it to its default state, when you are done, which might be different from what is was before you started.


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to