diff options
author | Ricardo Mestre <mestre@cvs.openbsd.org> | 2018-08-11 10:58:40 +0000 |
---|---|---|
committer | Ricardo Mestre <mestre@cvs.openbsd.org> | 2018-08-11 10:58:40 +0000 |
commit | fa9012dbaa5f36248647c5f69e0a72bdd7fbe18d (patch) | |
tree | ddf947581fa00594caa588606d56e6bbba59651a /usr.bin/mesg | |
parent | e8c16cf98b37a3d98c1cb4467676bf2b341ec9fb (diff) |
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@
Diffstat (limited to 'usr.bin/mesg')
-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); |