diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-09 00:40:17 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-09 00:40:17 -0400 |
commit | 0716b10ac8dc167f96969c964974d4094035fed0 (patch) | |
tree | 176e7cfc3f34eeee3fc5d00130be0eadf5e07a43 /src/network/if_indextoname.c | |
parent | ca9aff6a1646c7fc106bfbb9399b3a1bcb14f18b (diff) | |
download | musl-0716b10ac8dc167f96969c964974d4094035fed0.tar.gz musl-0716b10ac8dc167f96969c964974d4094035fed0.tar.bz2 musl-0716b10ac8dc167f96969c964974d4094035fed0.tar.xz musl-0716b10ac8dc167f96969c964974d4094035fed0.zip |
fix missing SOCK_CLOEXEC in various functions that use sockets internally
Diffstat (limited to 'src/network/if_indextoname.c')
-rw-r--r-- | src/network/if_indextoname.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/if_indextoname.c b/src/network/if_indextoname.c index f18f17a6..6ee7f13c 100644 --- a/src/network/if_indextoname.c +++ b/src/network/if_indextoname.c @@ -10,7 +10,7 @@ char *if_indextoname(unsigned index, char *name) struct ifreq ifr; int fd, r; - if ((fd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) return 0; + if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) return 0; ifr.ifr_ifindex = index; r = ioctl(fd, SIOCGIFNAME, &ifr); __syscall(SYS_close, fd); |