kuhn@rhlab.UUCP (Mike Kuhn) (09/27/90)
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.?
mikey@quiche.cs.mcgill.ca (Michael GALLOP) (10/02/90)
In article <154@rhlab.UUCP>, kuhn@rhlab.UUCP (Mike Kuhn) writes: > > 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. > I would be interested to know what kind of system you are on. From my experience both the SUN4 (running SunOS 4.0.3 and 4.1) and the DG AViiON running DG/UX automatically change the owner of the /dev/tty entry to the UID on login. Otherwise mesg would have to be setuid, in order to make the terminal non-writeable. Then each editor would have to call it in order to lock the terminal to prevent writes (As VI does....) to screen. -- | mikey@quiche.cs.mcgill.ca | Mike Gallop | |"Stealing from one author is plagarism....Stealing from many is research" | I shall walk through the valley of Death and I shall fear no evil....... ..Except, perhaps, a sadistics assignment
gt0178a@prism.gatech.EDU (Jim Burns) (10/03/90)
in article <5124@quiche.cs.mcgill.ca>, mikey@quiche.cs.mcgill.ca (Michael GALLOP) says: > non-writeable. Then each editor would have to call it in order to lock the > terminal to prevent writes (As VI does....) to screen. Vi prevents writes? News to me. -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu
jon@jonlab.UUCP (Jon H. LaBadie) (10/06/90)
In article <14439@hydra.gatech.EDU>, gt0178a@prism.gatech.EDU (Jim Burns) writes: > > Vi prevents writes? News to me. > If you have "set nomesg" in your .exrc file or your EXINIT parameter, then vi notes the tty writability on entry. Then any time it is in visual mode, it will turn writes to the tty off, restoring the original setting when escaping to ex mode, the shell, or quiting. If I recall properly, changing the setting of mesg after entering the editor is ineffective even though "set all" shows "nomesg". -- Jon LaBadie {att, princeton, bcr, attmail!auxnj}!jonlab!jon