The first commit splits out bst-init into its own executable. This has a
bunch of interesting properties for bst:
First, it allows us to rewrite the process cmdline without doing
anything too crazy (cough PR_SET_MM_MAP), which helps tools
distinguish bst from its init process
Second, we don't need to explicitly mark the init as dumpable to let
inner processes with root privileges look at /proc/1/*.
Third, this lets us implement --init, which allows user to specify an
init process of their choosing, should the behaviour of bst-init not be
adapted to the situation they're in.
This supersedes #12.
The second commit is optional. I wanted to see if bst --init=/some/init --share-pid was even correct, but it turns out we can give it reasonable semantics. A somewhat interesting use-case is catching daemons that try to escape while still operating in the parent pid namespace.
The first commit splits out bst-init into its own executable. This has a bunch of interesting properties for bst:
First, it allows us to rewrite the process cmdline without doing anything too crazy (cough PR_SET_MM_MAP), which helps tools distinguish bst from its init process
Second, we don't need to explicitly mark the init as dumpable to let inner processes with root privileges look at /proc/1/*.
Third, this lets us implement --init, which allows user to specify an init process of their choosing, should the behaviour of bst-init not be adapted to the situation they're in.
This supersedes #12.
The second commit is optional. I wanted to see if
bst --init=/some/init --share-pid
was even correct, but it turns out we can give it reasonable semantics. A somewhat interesting use-case is catching daemons that try to escape while still operating in the parent pid namespace.