HomeFreeBSD

elfcopy: Avoid leaking dst's fd when we fail to copy a file.

Description

elfcopy: Avoid leaking dst's fd when we fail to copy a file.

We should really create the output file in the same directory as the
destination file so that rename() works. This will be done in a future
change as part of some work to run in capability mode.

CID: 1262523
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on
Parents
rS357537: elfcopy: Handle multiple data descriptors properly.
Branches
Unknown
Tags
Unknown