diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2016-09-02 16:32:20 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2016-09-02 16:32:20 +0000 |
commit | dfe7a3d6f3a7f463fd02a43088dcb9a262ce2434 (patch) | |
tree | 40e556b473a63db9bf5ece1b3fe5ea23dcdf7575 /usr.sbin | |
parent | 3d187934ed73f8b463004ac689136f0230c7e39a (diff) |
Pledge earlier on eigrpe.
This is for consistency with the other routing daemons.
ok claudio@ "earlier is better" benno@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/eigrpd/eigrpe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/eigrpd/eigrpe.c b/usr.sbin/eigrpd/eigrpe.c index 93154951332..eb5a1ce8331 100644 --- a/usr.sbin/eigrpd/eigrpe.c +++ b/usr.sbin/eigrpd/eigrpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eigrpe.c,v 1.27 2016/09/02 16:29:55 renato Exp $ */ +/* $OpenBSD: eigrpe.c,v 1.28 2016/09/02 16:32:19 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -130,6 +130,9 @@ eigrpe(int debug, int verbose, char *sockname) setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) fatal("can't drop privileges"); + if (pledge("stdio cpath inet mcast recvfd", NULL) == -1) + fatal("pledge"); + event_init(); /* setup signal handler */ @@ -165,9 +168,6 @@ eigrpe(int debug, int verbose, char *sockname) if ((pkt_ptr = calloc(1, READ_BUF_SIZE)) == NULL) fatal("eigrpe"); - if (pledge("stdio cpath inet mcast recvfd", NULL) == -1) - fatal("pledge"); - event_dispatch(); eigrpe_shutdown(); |