diff options
author | jmatthew <jmatthew@openbsd.org> | 2015-11-15 01:31:57 +0000 |
---|---|---|
committer | jmatthew <jmatthew@openbsd.org> | 2015-11-15 01:31:57 +0000 |
commit | 30135bcb21dd2fb294923767bf22c19291ae5a75 (patch) | |
tree | 52cae08bfcf7c3cf97f8d818579ac48a53943ed1 /usr.sbin/ypldap/ypldap.c | |
parent | Move zapping of invalid GPT data into GPT_get_gpt() rather than (diff) | |
download | wireguard-openbsd-30135bcb21dd2fb294923767bf22c19291ae5a75.tar.xz wireguard-openbsd-30135bcb21dd2fb294923767bf22c19291ae5a75.zip |
pledge for ypldap is easy because it's purely a network program.
One process talks to yp clients, one talks to ldap servers, one does dns.
ok deraadt@
Diffstat (limited to 'usr.sbin/ypldap/ypldap.c')
-rw-r--r-- | usr.sbin/ypldap/ypldap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ypldap/ypldap.c b/usr.sbin/ypldap/ypldap.c index 327a78315ae..331b6b0d08a 100644 --- a/usr.sbin/ypldap/ypldap.c +++ b/usr.sbin/ypldap/ypldap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypldap.c,v 1.16 2015/11/02 10:06:06 jmatthew Exp $ */ +/* $OpenBSD: ypldap.c,v 1.17 2015/11/15 01:31:57 jmatthew Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -608,6 +608,9 @@ main(int argc, char *argv[]) #warning disabling privilege revocation in debug mode #endif + if (pledge("stdio inet", NULL) == -1) + fatal("pledge"); + bzero(&tv, sizeof(tv)); evtimer_set(&ev_timer, main_init_timer, &env); evtimer_add(&ev_timer, &tv); |