Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!clyde!watmath!cantuar!james From: james@cantuar.UUCP (J. Collier) Newsgroups: comp.unix.wizards Subject: Re: Large machines and tty naming conventions. Message-ID: <157@cantuar.UUCP> Date: Thu, 13-Aug-87 00:41:32 EDT Article-I.D.: cantuar.157 Posted: Thu Aug 13 00:41:32 1987 Date-Received: Sat, 15-Aug-87 17:17:07 EDT References: <8550@brl-adm.ARPA> <7757@mimsy.UUCP> Reply-To: james@cantuar.UUCP (J. Collier) Organization: University of Canterbury, Christchurch, New Zealand Lines: 22 Keywords: servers pty pseudo-terminals Summary: pseudo-terminal server/library interface suggestion. In article <7757@mimsy.UUCP> Chris Torek (chris@mimsy.UUCP) writes: > ...... Even so, finding a >free pair of ptys is too hard; 4BSD needs a general resource manager, >with which one can simply say `call this phone number' or `I want >a pty master and slave' or `I would like to write to joe'. > I have developed a pseudo-terminal server and a couple of client library routines for handling the allocation of pseudo-terminals. The library routines use unix-domain IPC to acquire and relinquish master/slave pairs from the server - the master fd is passed in the access rights field to avoid races. Since the server runs as root it can also handle tty ownership and utmp updating if requested. Client processes are periodically checked and privileges are revoked if they have died. The system is somewhat hairy in places, especially in its attempts to provide a reasonable level of security. This may not be justifiable, given that tty security is still a bad joke anyway (4.3BSD). It also contains a certain amount of borrowed code (utmp stuff & other bits from John Bruner's "uw"). Perhaps someone would be interested in writing a similar system suitable for public release. ------------------------- James Collier (james@cantuar.uucp / {watmath,munnari,mcvax}!cantuar!james) Computer Science Dept., University of Canterbury, Christchurch, New Zealand.