From 7acc027df754fde4dfc5b926d6a1fdb3bef2cbd9 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 12 Oct 2015 06:00:57 +0000 Subject: [PATCH] same thing as biff, pledge "stdio rpath fattr tty" --- usr.bin/mesg/mesg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/mesg/mesg.c b/usr.bin/mesg/mesg.c index fd1483eca62..fa16831736a 100644 --- a/usr.bin/mesg/mesg.c +++ b/usr.bin/mesg/mesg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mesg.c,v 1.8 2009/10/27 23:59:40 deraadt Exp $ */ +/* $OpenBSD: mesg.c,v 1.9 2015/10/12 06:00:57 deraadt Exp $ */ /* $NetBSD: mesg.c,v 1.4 1994/12/23 07:16:32 jtc Exp $ */ /* @@ -52,6 +52,9 @@ main(int argc, char *argv[]) char *tty; int ch; + if (pledge("stdio rpath fattr tty", NULL) == -1) + err(1, "pledge"); + while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': -- 2.20.1