=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/showmount/showmount.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- src/usr.bin/showmount/showmount.c 2015/08/20 22:32:42 1.18 +++ src/usr.bin/showmount/showmount.c 2015/11/17 15:01:28 1.19 @@ -1,4 +1,4 @@ -/* $OpenBSD: showmount.c,v 1.18 2015/08/20 22:32:42 deraadt Exp $ */ +/* $OpenBSD: showmount.c,v 1.19 2015/11/17 15:01:28 deraadt Exp $ */ /* $NetBSD: showmount.c,v 1.7 1996/05/01 18:14:10 cgd Exp $ */ /* @@ -49,6 +49,7 @@ #include #include #include +#include /* Constant defs */ #define ALL 1 @@ -105,6 +106,9 @@ char *host; int ch, clnt_sock; + if (pledge("stdio rpath inet dns", NULL) == -1) + err(1, "pledge"); + while ((ch = getopt(argc, argv, "ade3")) != -1) switch (ch) { case 'a': @@ -158,6 +162,9 @@ } timeout.tv_sec = 30; timeout.tv_usec = 0; + + if (pledge("stdio rpath", NULL) == -1) + err(1, "pledge"); if (rpcs & DODUMP) { estat = clnt_call(client, RPCMNT_DUMP, xdr_void, (char *)0,