SB++
Sandbox applications
Loading...
Searching...
No Matches
binaries Namespace Reference

Binary Dependency Resolution This header contains the functions needed to determine the dependencies needed for binary files. It does this both against traditional ELF binaries, leveraging LDD in libraries.hpp, but also supports tokenizing and parsing shell scripts to extract shebangs and commands used for dynamic dependency resolution. This support is far more nuanced than in Python-SB, as we incorporate variables and using the shell interpreter itself to uncover libraries and binaries inaccessible to the old tokenizer. More...

Typedefs

using bin_t = shared::set
 

Functions

void parse (bin_t &required, std::string path, libraries::lib_t &libraries)
 Parse a binary to determine dependencies.
 
void setup (const bin_t &binaries, shared::vector &command)
 Setup the sandbox for the used binaries.
 
void symlink (shared::vector &command)
 Symlink to /usr/bin.
 

Variables

set searched = {}
 
set builtins = {"printf", "echo"}
 

Detailed Description

Binary Dependency Resolution This header contains the functions needed to determine the dependencies needed for binary files. It does this both against traditional ELF binaries, leveraging LDD in libraries.hpp, but also supports tokenizing and parsing shell scripts to extract shebangs and commands used for dynamic dependency resolution. This support is far more nuanced than in Python-SB, as we incorporate variables and using the shell interpreter itself to uncover libraries and binaries inaccessible to the old tokenizer.

Function Documentation

◆ parse()

void binaries::parse ( bin_t & required,
std::string path,
libraries::lib_t & libraries )

Parse a binary to determine dependencies.

Parameters
requiredThe binary accumulator.
pathThe path to the binary.
librariesThe current list of libraries.
Note
libraries are updated.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setup()

void binaries::setup ( const bin_t & binaries,
shared::vector & command )

Setup the sandbox for the used binaries.

Parameters
binariesThe binaries to link into the sandbox.
applicationThe application to link to this SOF.
commandThe sandbox command
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ symlink()

void binaries::symlink ( shared::vector & command)

Symlink to /usr/bin.

Parameters
commandThe command to append to.
+ Here is the call graph for this function:
+ Here is the caller graph for this function: