diff options
| author | Roy Marples <roy@marples.name> | 2008-06-10 22:23:57 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-06-10 22:23:57 +0000 |
| commit | eb942e0abce48272767404ca604573d3ea674302 (patch) | |
| tree | 479c4d8049b34bb3758034ca0bd2354dce079ce3 /lpf.c | |
| parent | 7349c9bf8cf950dfb92d53f9a860f34b33d97229 (diff) | |
| download | dhcpcd-eb942e0abce48272767404ca604573d3ea674302.tar.xz | |
Remove the signal array stack as our pipe handling should be secure enough now. Also, move the normalize close_on_exec and setting non block.
Diffstat (limited to 'lpf.c')
| -rw-r--r-- | lpf.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -102,12 +102,11 @@ open_socket(struct interface *iface, int protocol) } if (setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, &pf, sizeof(pf)) != 0) goto eexit; - if ((flags = fcntl(s, F_GETFL, 0)) == -1 - || fcntl(s, F_SETFL, flags | O_NONBLOCK) == -1) + if (set_cloexec(s) == -1) goto eexit; - if (bind(s, &su.sa, sizeof(su)) == -1) + if (set_nonblock(s) == -1) goto eexit; - if (close_on_exec(s) == -1) + if (bind(s, &su.sa, sizeof(su)) == -1) goto eexit; #ifdef ENABLE_ARP if (protocol == ETHERTYPE_ARP) |
