From owner-freebsd-current Mon Oct 14 08:11:47 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA02690 for current-outgoing; Mon, 14 Oct 1996 08:11:47 -0700 (PDT) Received: from gw.itfs.nsk.su (gw.itfs.nsk.su [193.124.36.33]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id IAA02665 for ; Mon, 14 Oct 1996 08:11:25 -0700 (PDT) Received: from itfs.UUCP (uucp@localhost) by gw.itfs.nsk.su (8.6.12/8.6.12) with UUCP id VAA01876 for current@freebsd.org; Mon, 14 Oct 1996 21:10:19 +0600 Received: by itfs.nsk.su; Mon, 14 Oct 96 22:07:40 +0700 (NST) Received: (from daemon@localhost) by news.itfs.nsk.su (8.7.5/8.6.12) id VAA22059; Mon, 14 Oct 1996 21:51:13 +0700 (NSD) From: "Nickolay N. Dudorov" To: current@freebsd.org Subject: sgttyb vs. termios in current (?) Date: 14 Oct 1996 14:51:11 GMT Message-ID: <53tk0v$hse@news.itfs.nsk.su> Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk After installation of 961006-SNAP on one of my systems I've made a kernel without COMPAT_43 option and discover that 'rlogin' echo-ed my password ;-( Investigations of sources shows that some programs still used (now obsoleted ?) sgtty headers and functions. The main "home" of such programs is 'src/games'. There are: atc, backgammon, hack, larn, rain, rogue, snake, tetris, trek, worms. Personaly I have no interest in rewriting any of this toward termios (never have used any of them on FreeBSD ;). 'src/usr.sbin' have some number of such programs also. Stuff in 'xntpd/clockstuff' and 'pcvt/vttest' seems unused in FreeBSD. 'pcvt/fontedit' looks suspicious - it tests #ifdef BSD (and uses sgttyb) before testing #if defined(__FreeBSD__). 'watch' unconditionally use sgttyb only (due to author's absence ?). In 'src/usr.bin' there is one unused(?) file in 'ee' (ee/doc/new_curse.c). 'src/usr.bin/talk/io.c' gives wanderfull example of sgttyb use: ioctl(0, FIONREAD, (struct sgttyb *) &nb); where nb is int ;-) (so the text in inner parens can/must be deleted). The two programs which I have interest in are 'rlogin' and 'lock'. Both of them was patched to use 'termios' in OpenBSD (may be in NetBSD also, but is there (anon)CVS acces to NetBSD-current ?). I've made patches for FreeBSD-current based on OpenBSD versions of rlogin and lock. If it is desirable, I can send-pr them. There is small problem with 'rlogin' - OpenBSD version discard 'litout' mode from terminal settings and options parsing, but not from options list and 'usage' message. In my patch I just ignore 'L' option, but accept it (to avoid man page rewriting ;-). Another question with 'lock' sources in FreeBSD was rised by: s[0] = NULL; assignment (with 'char s[BUFSIZ]' declaration). Corresponding line in OpenBSD looks like: s[0] = '\0'; This is not a real 'bug' and I've not touch it in my patch, but in current form it is not correct (and must be rewritten to, say: s[0] = 0; to save 3 bytes * miriads of disks with FreeBSD sources ;-) N. Dudorov