commit 013cb6ba880648933e4bf42c8aebb088e532fb65
parent 7ddb385a5a7917955e0b792aaa6e6661281c0133
Author: Stephen Gregoratto <dev@sgregoratto.me>
Date: Thu, 31 Oct 2019 20:46:33 +1100
Add pledge
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/ipaddr.c b/ipaddr.c
@@ -24,6 +24,11 @@ main(int argc, char **argv)
char *iface;
size_t sa_size;
+#if HAVE_PLEDGE
+ if (pledge("stdio") == -1)
+ err(1, "pledge");
+#endif
+
if (argc != 3) {
if (argc > 3)
warnx("too many arguments: %s", argv[3]);