diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2015-10-10 00:37:41 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2015-10-10 00:37:41 +0000 |
commit | 59b3632ed89cca416cf563b09f93457ce34efd48 (patch) | |
tree | 1822bb524dc271156215f2f2dbde4d1af789368a | |
parent | c52e32d046bb803bd5c80fc5b07536ad1ac69c85 (diff) |
relayctl pledges to use stdio only
ok reyk@ sure deraadt@
-rw-r--r-- | usr.sbin/relayctl/relayctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/relayctl/relayctl.c b/usr.sbin/relayctl/relayctl.c index defc498a231..2f8bb5c043c 100644 --- a/usr.sbin/relayctl/relayctl.c +++ b/usr.sbin/relayctl/relayctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayctl.c,v 1.53 2015/01/22 17:42:09 reyk Exp $ */ +/* $OpenBSD: relayctl.c,v 1.54 2015/10/10 00:37:40 benno Exp $ */ /* * Copyright (c) 2007 - 2013 Reyk Floeter <reyk@openbsd.org> @@ -124,6 +124,9 @@ main(int argc, char *argv[]) err(1, "connect: %s", RELAYD_SOCKET); } + if (pledge("stdio", NULL) == -1) + err(1, "tame"); + if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL) err(1, NULL); imsg_init(ibuf, ctl_sock); |