summaryrefslogtreecommitdiffstats
path: root/usr.bin/wall
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1994-10-23 15:33:55 +0000
committerguido <guido@FreeBSD.org>1994-10-23 15:33:55 +0000
commitbe99ddf809b6d0e6c08039424cddd7b74cb237ce (patch)
tree3d2de7fa4dad6cdc53dcadcafe2a7934ecf3daa7 /usr.bin/wall
parent052101cf252f7d9a7f8beb21163b0cc428466d1a (diff)
downloadFreeBSD-src-be99ddf809b6d0e6c08039424cddd7b74cb237ce.zip
FreeBSD-src-be99ddf809b6d0e6c08039424cddd7b74cb237ce.tar.gz
The talkd security hole can ealso be exploited by wall (and thus rwall).
write and talk are not affected. Now print out escape sequences in the same way as is done by write(1).
Diffstat (limited to 'usr.bin/wall')
-rw-r--r--usr.bin/wall/wall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c
index 9b120ed..083f0f5 100644
--- a/usr.bin/wall/wall.c
+++ b/usr.bin/wall/wall.c
@@ -178,6 +178,11 @@ makemsg(fname)
putc('\r', fp);
putc('\n', fp);
cnt = 0;
+ } else if (!isprint(ch) && !isspace(ch) && ch != '\007')
+ {
+ putc('^', fp);
+ putc(ch^0x40, fp); /* DEL to ?, others to a
+lpha */
} else
putc(ch, fp);
}
OpenPOWER on IntegriCloud