Fix write to other user's tty. The device has to be opened with
authorbluhm <bluhm@openbsd.org>
Tue, 20 Oct 2015 20:21:18 +0000 (20:21 +0000)
committerbluhm <bluhm@openbsd.org>
Tue, 20 Oct 2015 20:21:18 +0000 (20:21 +0000)
commit619dd0015dad2a1951802049ae8d48efdf5a1b6f
tree71a1858a4b74a4f0c9b96b255c1dd13e9037b70b
parentc169fbf63001fd1b7df75e315d7fdfdba9b5ca98
Fix write to other user's tty.  The device has to be opened with
O_WRONLY, but without O_CREAT.  So freopen(3) has to be replaced
with open(2) and dup2(2).
from deraadt@
usr.bin/write/write.c