Bug 170369 - More O_CLOEXEC flags to plug files being leaked to child processes
Summary: More O_CLOEXEC flags to plug files being leaked to child processes
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.1-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-04 10:20 UTC by jau
Modified: 2017-12-31 22:29 UTC (History)
0 users

See Also:


Attachments
file.diff (9.08 KB, patch)
2012-08-04 10:20 UTC, jau
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jau 2012-08-04 10:20:05 UTC
This is a merged patch to plug many potential file descriptor leaks from parent
to child processes when one thread calls a function which opens a file and
another thread executes a child process before the thread with the new file
descriptor gets time to set FD_CLOEXEC.
All of the changes included simply add O_CLOEXEC to the options to open().

Some of the changes included in this merged patch rely on another patch which
extends fopen() to set O_CLOEXEC when necessary

http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/169320

Do not try this one without applying the dependency as well.

Fix: See full description above.

Patch attached with submission follows:
How-To-Repeat: See full description above.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:30 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped