diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-10 21:08:10 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-10 21:08:10 +0000 |
commit | 0c2b3e9cb46930c2381a78e5f5e2db143b99a7d6 (patch) | |
tree | 1b2d5db70a2d7cc704ea7a72b18a6aea190ff6ef /usr.bin/ypcat/ypcat.c | |
parent | 9b1bc1e60003cc47bfdb81e4d056a8d74bc48dd1 (diff) |
pledge "stdio inet rpath" seems to be enough for a YP environment.
rpath is to access /etc/rpc, and inet to talk to portmap & local world.
ok beck
Diffstat (limited to 'usr.bin/ypcat/ypcat.c')
-rw-r--r-- | usr.bin/ypcat/ypcat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ypcat/ypcat.c b/usr.bin/ypcat/ypcat.c index 26f9df78b22..a87f4361f49 100644 --- a/usr.bin/ypcat/ypcat.c +++ b/usr.bin/ypcat/ypcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypcat.c,v 1.16 2015/02/08 23:40:35 deraadt Exp $ */ +/* $OpenBSD: ypcat.c,v 1.17 2015/10/10 21:08:09 deraadt Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com> @@ -88,6 +88,9 @@ main(int argc, char *argv[]) extern int optind; int notrans, c, r, i; + if (pledge("stdio rpath inet", NULL) == -1) + perror("pledge"); + notrans = key = 0; while ((c=getopt(argc, argv, "xd:kt")) != -1) switch (c) { |