Date: Mon, 5 Mar 2001 17:29:49 +0600 (NOVT) From: nnd@mail.nsk.ru To: FreeBSD-gnats-submit@freebsd.org Subject: bin/25541: Bug in the -CURRENT 'wall' command Message-ID: <200103051129.f25BTnd00793@wint.itfs.nsk.su>
next in thread | raw e-mail | index | archive | help
>Number: 25541 >Category: bin >Synopsis: Bug in the -CURRENT 'wall' command >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 05 03:30:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Nickolay Dudorov >Release: FreeBSD 5.0-CURRENT i386 >Organization: STE Infoteka >Environment: System: FreeBSD wint.itfs.nsk.su 5.0-CURRENT FreeBSD 5.0-CURRENT #16: Mon Mar 5 13:44:50 NOVT 2001 nnd@wint.itfs.nsk.su:/usr/obj/usr/src/sys/WINTS i386 >Description: Version 1.7 of the 'src/usr.bin/wall/ttymsg.c' makes the device's names of the types : /dev/ttyp0, /dev/ttyp0ttyp1, /dev/ttyp0ttyp1ttyp2 and thus 'wall' (despite the name - Write to ALL) write the message only to the first one of them. >How-To-Repeat: Use the 'wall' command on the system with more than one line in use. >Fix: Apply the next patch (or other one with the same effect ;-) Index: src/usr.bin/wall/ttymsg.c =================================================================== RCS file: /scratch/CVS/src/usr.bin/wall/ttymsg.c,v retrieving revision 1.7 diff -b -u -r1.7 ttymsg.c --- src/usr.bin/wall/ttymsg.c 2001/03/01 05:43:12 1.7 +++ src/usr.bin/wall/ttymsg.c 2001/03/05 11:11:56 @@ -71,7 +71,7 @@ if (iovcnt > sizeof(localiov) / sizeof(localiov[0])) return ("too many iov's (change code in wall/ttymsg.c)"); - strlcat(device, line, sizeof(device)); + strlcpy(device + sizeof(_PATH_DEV) - 1, line, sizeof(device)); if (strchr(device + sizeof(_PATH_DEV) - 1, '/')) { /* A slash is an attempt to break security... */ (void) snprintf(errbuf, sizeof(errbuf), >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103051129.f25BTnd00793>