summaryrefslogtreecommitdiff
path: root/usr.sbin/rdate/ntp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/rdate/ntp.c')
-rw-r--r--usr.sbin/rdate/ntp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/rdate/ntp.c b/usr.sbin/rdate/ntp.c
index 688436ac4de..547bdd98e53 100644
--- a/usr.sbin/rdate/ntp.c
+++ b/usr.sbin/rdate/ntp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.c,v 1.33 2015/01/16 06:40:20 deraadt Exp $ */
+/* $OpenBSD: ntp.c,v 1.34 2018/08/18 15:25:20 mestre Exp $ */
/*
* Copyright (c) 1996, 1997 by N.M. Maclaren. All rights reserved.
@@ -136,6 +136,9 @@ ntp_client(const char *hostname, int family, struct timeval *new,
/*NOTREACHED*/
}
+ if (pledge("stdio inet", NULL) == -1)
+ err(1, "pledge");
+
corrleaps = leapflag;
if (corrleaps)
ntpleaps_init();