ebtables: libebtc: Open the lockfile with O_CLOEXEC

Fix from upstream: https://git.netfilter.org/ebtables/commit/?id=46eb78ff358724f5addf14e45f2cfc31542ede3c
arm-sdk7
pedro 5 years ago
parent d3d405f3ba
commit a139b2a4c0

@ -144,7 +144,7 @@ static int lock_file()
int fd, try = 0;
retry:
fd = open(LOCKFILE, O_CREAT, 00600);
fd = open(LOCKFILE, O_CREAT|O_CLOEXEC, 00600);
if (fd < 0) {
if (try == 1 || mkdir(dirname(pathbuf), 00700))
return -2;

Loading…
Cancel
Save