Allow rtld direct-exec to take a file descriptor.

Description

Allow rtld direct-exec to take a file descriptor.

When executing rtld directly, allow a file descriptor to be explicitly
specified rather than opened from the given path. This, together with the
LD_LIBRARY_PATH_FDS environment variable, allows dynamically-linked
applications to be executed from within capability mode.

Also add some rudimentary argument parsing (without pulling in getopt or
the like) to accept this file descriptor, a help (-h) option and a basic
usage string.

Reviewed by: kib
Sponsored by: NSERC, RDC
Differential Revision: https://reviews.freebsd.org/D10751

Details

Committed
jonathanMay 17 2017, 10:51 PM
Reviewer
kib
Differential Revision
D10751: Allow rtld direct-exec to take a file descriptor.
Parents
rS318430: MFC r318160, 318176: Persistently store NIC's hardware MAC address, and add
Branches
Unknown
Tags
Unknown