UID ownership of cooperating tty

Mike Kuhn kuhn at rhlab.UUCP
Fri Sep 28 00:50:35 AEST 1990


I need to know the best/safest/only way to assign ownership of a
cooperating tty to UID of the users login terminal. I basically feel that
the solution I have (using the SUID and root) seems inappropriate for a
SIMPLE application.

Application: User starts a program that will interact with a  laboratory
device. Data regarding the device is displayed on the screen. Input from
the device comes through a cooperating tty (getty turned off) which the
application is reading from. Requests for output to the device can originate
on the users keyboard or via a keypad that is connected to the laboratory
device. Application basically polls the keyboard and keypad looking for
input. Commands are then written to cooperating tty to direct laboratory
device.

To change ownership of the cooperating tty requires:

1. Application must be SUID root.
2. Program changes ownership of /dev/tty?? to real UID.

Do I really need SUID root? How should the application be written to get me
this privilege without risking security problems of SUID root.?
  



More information about the Comp.unix.questions mailing list