Skip to content

Commit

Permalink
Pledge earlier on eigrpe.
Browse files Browse the repository at this point in the history
This is for consistency with the other routing daemons.

ok claudio@ "earlier is better" benno@
  • Loading branch information
rwestphal committed Sep 2, 2016
1 parent 63c90ce commit 3928a7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eigrpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 3928a7e

Please sign in to comment.