summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rdate/rfc868time.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/rdate/rfc868time.c')
-rw-r--r--usr.sbin/rdate/rfc868time.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/rdate/rfc868time.c b/usr.sbin/rdate/rfc868time.c
index be97fcd4785..2158fb632dc 100644
--- a/usr.sbin/rdate/rfc868time.c
+++ b/usr.sbin/rdate/rfc868time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfc868time.c,v 1.10 2015/01/16 06:40:20 deraadt Exp $ */
+/* $OpenBSD: rfc868time.c,v 1.11 2018/08/18 15:25:20 mestre Exp $ */
/* $NetBSD: rdate.c,v 1.4 1996/03/16 12:37:45 pk Exp $ */
/*
@@ -82,6 +82,9 @@ rfc868time_client(const char *hostname, int family, struct timeval *new,
/*NOTREACHED*/
}
+ if (pledge("stdio inet", NULL) == -1)
+ err(1, "pledge");
+
s = -1;
for (res = res0; res; res = res->ai_next) {
s = socket(res->ai_family, res->ai_socktype, res->ai_protocol);