aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/wall/wall.c
diff options
context:
space:
mode:
authorGuido van Rooij <guido@FreeBSD.org>1994-10-23 15:33:55 +0000
committerGuido van Rooij <guido@FreeBSD.org>1994-10-23 15:33:55 +0000
commitacc879c13f9af78958a0bb2c79423713c5d7c75b (patch)
tree3d2de7fa4dad6cdc53dcadcafe2a7934ecf3daa7 /usr.bin/wall/wall.c
parent26305b211a18a93733fadf15bd02644af31bbf03 (diff)
downloadsrc-acc879c13f9af78958a0bb2c79423713c5d7c75b.tar.gz
src-acc879c13f9af78958a0bb2c79423713c5d7c75b.zip
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).
Notes
Notes: svn path=/head/; revision=3809
Diffstat (limited to 'usr.bin/wall/wall.c')
-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 9b120edb4dcc..083f0f51236c 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);
}