diff options
| author | 2018-08-11 10:58:39 +0000 | |
|---|---|---|
| committer | 2018-08-11 10:58:39 +0000 | |
| commit | c2f279245ebac5655292ee760fc5d0712f47ec35 (patch) | |
| tree | c74394983fd03e9900dcae4204ea2b393e30a067 | |
| parent | Use MAXCPUS as the number of elements for the array of per-cpu data. (diff) | |
| download | wireguard-openbsd-c2f279245ebac5655292ee760fc5d0712f47ec35.tar.xz wireguard-openbsd-c2f279245ebac5655292ee760fc5d0712f47ec35.zip | |
this one was my fault, when an error occurrs on mesg(1) it must exit with error
values >1 since the return value 1 is used to indicate that messages have been
disallowed. while here also s/unveil/pledge on err(3).
OK tb@ kn@ deraadt@
| -rw-r--r-- | usr.bin/mesg/mesg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mesg/mesg.c b/usr.bin/mesg/mesg.c index a2dc944ed5c..1de4aa799bc 100644 --- a/usr.bin/mesg/mesg.c +++ b/usr.bin/mesg/mesg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mesg.c,v 1.13 2018/08/03 06:57:34 deraadt Exp $ */ +/* $OpenBSD: mesg.c,v 1.14 2018/08/11 10:58:39 mestre Exp $ */ /* $NetBSD: mesg.c,v 1.4 1994/12/23 07:16:32 jtc Exp $ */ /* @@ -65,9 +65,9 @@ main(int argc, char *argv[]) err(2, "ttyname"); if (unveil(tty, "rw") == -1) - err(1, "unveil"); + err(2, "unveil"); if (pledge("stdio rpath fattr", NULL) == -1) - err(1, "unveil"); + err(2, "unveil"); if (stat(tty, &sb) < 0) err(2, "%s", tty); |
