Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site onyx.UUCP Path: utzoo!linus!security!genrad!grkermit!masscomp!clyde!floyd!harpo!seismo!hao!hplabs!hpda!fortune!amd70!dual!onyx!bob From: bob@onyx.UUCP (Bob Toxen) Newsgroups: net.unix-wizards Subject: Re: un-dedicating a line to a dialer Message-ID: <120@onyx.UUCP> Date: Wed, 21-Dec-83 18:12:12 EST Article-I.D.: onyx.120 Posted: Wed Dec 21 18:12:12 1983 Date-Received: Mon, 26-Dec-83 01:09:48 EST References: <126@lpi3230.UUCP> Organization: Onyx Systems Inc., San Jose CA Lines: 32 We solved the getty/uucico problem by hacking getty to respect uucico's /usr/spool/uucp/LCK..ttyxx and when it successfully grabbed the lock to create one of its own called /usr/spool/uucp/LCK.g2.ttyxx which means: "I have the line but I'm just waiting for someone to login [our tty driver/ modem combo have the problem that the modem will only assert RTS when someone calls in but not when you want to call out] but if you send me a SIGTERM or SIGHUP I'll close the file, 'chmod 666 /dev/ttyxx', and remove the locks (LCK.g2.ttyxx first) and wait a minute before again trying to grab LCK..ttyxx". Be sure to also do this before getty exits in any fashion. When getty is about to exec login it first creates LCK.g3.ttyxx and then unlinks LCK.g2.ttyxx. The LCK.g3.ttyxx is so that after the person logs out the next getty will, before trying to grab LCK..ttyxx, try to unlink LCK.g3.ttyxx and if it can it will assume that the previous getty left this and also a LCK..ttyxx which this getty will then unlink. UUCICO will, if LCK..ttyxx exists, check for the existance of LCK.g2.ttyxx BEFORE CHECKING THE AGE OF LCK..ttyxx and if it exists then send a signal to the getty (whose binary PID is in LCK.g2.ttyxx) via an intermediate program with mode 4110 with owner root and group uucp. This requires uucico to be both Set- UID AND Set-GID to uucp. This is more complex than I like but only takes about 30 lines of code in each of getty and uucico (sorry, I can't supply code) and doesn't require Kernel hacking or any intelligence in the port or modem. Bob Toxen ucbvax!amd70!onyx!bob