Skip to content
Commit 28af26ac authored by Suren Baghdasaryan's avatar Suren Baghdasaryan
Browse files

Convert ifstream usage into fopen() to prevent fd leaks into child processes



std::ifstream does not use O_CLOEXEC flag when opening files. This leads
to file descriptors being inherited by child processes. In the case of vold
this results in leaking FDs to less privileged children with no permission
for these files which occasionally leads to SELinux denials.

Bug: 129298168
Change-Id: Id2731782a25d65c9a7cbf25dc441f3e7a17609c1
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
parent b640f4e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment