diff options
author | Mika Westerberg <ext-mika.1.westerberg@nokia.com> | 2009-01-26 16:15:05 +0200 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2009-02-10 08:38:10 +0200 |
commit | 4cce31b57d50b667b03c34d37b42eb99254368f8 (patch) | |
tree | d494fd43ebdcb2b6bfd2de6d40e88c997d89fd07 /utils | |
parent | 11c9ef3f390169ca53f0dd7c3e9b1d584d561987 (diff) |
Argv&envp mangling rules are now generated only once per session.
- There is new lua script: create_argvmods_rules.lua which
is used to create explicit rules based rules created by argvenvp_xxx.lua.
- Separated mangling rules for misc binaries to be in file
argvenvp_misc.lua
- Rules are generated by sb2 script and placed under
$SBOX_SESSION_DIR/argvmods/*.
Signed-off-by: Lauri Aarnio <Lauri.Aarnio@iki.fi>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/sb2 | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -110,6 +110,25 @@ function create_reverse_rules() done } +# +# Generates argvmods for cross-compilers and misc binaries. +# Generated files are placed under $SBOX_SESSION_DIR/argvmods/. +# +function create_argvmods_rules() +{ + /bin/mkdir -p $SBOX_SESSION_DIR/argvmods + SBOX_ARGVMODS_SOURCE_FILE="argvenvp_misc.lua" sb2-monitor \ + -L $SBOX_LIBSB2 -- $SBOX_DIR/bin/sb2-show \ + execluafile \ + $SBOX_SESSION_DIR/lua_scripts/create_argvmods_rules.lua \ + >$SBOX_SESSION_DIR/argvmods/argvmods_misc.lua + SBOX_ARGVMODS_SOURCE_FILE="argvenvp_gcc.lua" sb2-monitor \ + -L $SBOX_LIBSB2 -- $SBOX_DIR/bin/sb2-show \ + execluafile \ + $SBOX_SESSION_DIR/lua_scripts/create_argvmods_rules.lua \ + >$SBOX_SESSION_DIR/argvmods/argvmods_gcc.lua +} + # Create some additional rules for the default mapping mode: function create_argvmods_usr_bin_rules() { @@ -1146,8 +1165,17 @@ then create_argvmods_usr_bin_rules "$CREATE_ARGVMODS_USR_BIN_RULES" fi -# Create reverse mapping rules before starting the actual command (or shell) if [ -z "$SBOX_JOIN_SESSION_FILE" ]; then + # + # Only generate argvmods rules when we are not joining + # to session. + # + create_argvmods_rules + + # + # Create reverse mapping rules before starting the + # actual command (or shell). + # if [ "$SBOX_CREATE_REVERSE_RULES" == "y" ]; then create_reverse_rules else |