summaryrefslogtreecommitdiff
path: root/utils/sb2
diff options
context:
space:
mode:
authorLauri Aarnio <Lauri.Aarnio@iki.fi>2008-12-08 16:58:31 +0200
committerLauri Leukkunen <lle@rahina.org>2008-12-11 23:47:00 +0200
commit576ed39bde4ec3034e22aa08b61e7084a87553a5 (patch)
treeff86f2d15fe5bbedbf20f83cee442f48d77fb700 /utils/sb2
parent52f61f715c3f53e0eb52e13400c1b979b8f26ab4 (diff)
Fixed /proc/self/exe (and /proc/<MY_PID>/exe)
- Implemented a special mapping function for /proc, to be able to map the symlink at /proc/self/exe. - This can be described as a countermeasure to side-effects of mapping exec parameters: /proc/self/exe (as well as /proc/<MY_PID>/exe, which is the same thing) need special care if the binary was started by anything else than direct exec. Examples: a) if CPU transparency is used, the real /proc/self/exe points to e.g. Qemu. Now SB2 can make it look like the link points to the binary which is running under qemu. b) if "ld.so-start" was used, the real /proc/self/exe points to ld.so and not to the binary itself. Again, SB2 maps that to a symlink which points to the correct binary. Other related things: - all mapping modes use this feature now - Lua <=> C interface version had to be incremented - Lua mapping code <=> mapping rules version had to be incremented
Diffstat (limited to 'utils/sb2')
-rwxr-xr-xutils/sb21
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/sb2 b/utils/sb2
index a97868f..7d9c667 100755
--- a/utils/sb2
+++ b/utils/sb2
@@ -721,6 +721,7 @@ function initialize_new_sb2_session()
mkdir -p $SBOX_SESSION_DIR
mkdir $SBOX_SESSION_DIR/tmp
+ mkdir $SBOX_SESSION_DIR/proc
mkdir $SBOX_SESSION_DIR/rules
mkdir $SBOX_SESSION_DIR/rev_rules