Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open files with O_CLOEXEC #1202

Open
ensc opened this issue Dec 8, 2022 · 1 comment
Open

Open files with O_CLOEXEC #1202

ensc opened this issue Dec 8, 2022 · 1 comment

Comments

@ensc
Copy link
Contributor

ensc commented Dec 8, 2022

To increase thread safety, the rrd files should be opened with O_CLOEXEC. Else, the fd might leak to programs which are started by execv() in other threads.

Atm, only

openat(AT_FDCWD, "/log/iftraf/ext0.rrd", O_RDWR) = 4

is used which is prone for races

@oetiker
Copy link
Owner

oetiker commented Dec 12, 2022

can you provide a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants