Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bab1e600 authored by Todd Frederick's avatar Todd Frederick Committed by Automerger Merge Worker
Browse files

Merge "dumpstate: Close API FDs on exec" am: b8ba6e9c

parents 306ae273 b8ba6e9c
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2733,8 +2733,8 @@ void Dumpstate::DumpOptions::Initialize(BugreportMode bugreport_mode,
                                        const android::base::unique_fd& screenshot_fd_in,
                                        const android::base::unique_fd& screenshot_fd_in,
                                        bool is_screenshot_requested) {
                                        bool is_screenshot_requested) {
    // Duplicate the fds because the passed in fds don't outlive the binder transaction.
    // Duplicate the fds because the passed in fds don't outlive the binder transaction.
    bugreport_fd.reset(dup(bugreport_fd_in.get()));
    bugreport_fd.reset(fcntl(bugreport_fd_in.get(), F_DUPFD_CLOEXEC, 0));
    screenshot_fd.reset(dup(screenshot_fd_in.get()));
    screenshot_fd.reset(fcntl(screenshot_fd_in.get(), F_DUPFD_CLOEXEC, 0));


    SetOptionsFromMode(bugreport_mode, this, is_screenshot_requested);
    SetOptionsFromMode(bugreport_mode, this, is_screenshot_requested);
}
}