summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/getcap.c')
-rw-r--r--lib/libc/gen/getcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c
index 2700d3d..c321d12 100644
--- a/lib/libc/gen/getcap.c
+++ b/lib/libc/gen/getcap.c
@@ -264,7 +264,7 @@ getent(char **cap, u_int *len, char **db_array, int fd, const char *name,
*cap = cbuf;
return (retval);
} else {
- fd = _open(*db_p, O_RDONLY, 0);
+ fd = _open(*db_p, O_RDONLY | O_CLOEXEC, 0);
if (fd < 0)
continue;
myfd = 1;
OpenPOWER on IntegriCloud