summaryrefslogtreecommitdiff
path: root/lua_scripts/pathmaps/devel/00_default.lua
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 /lua_scripts/pathmaps/devel/00_default.lua
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 'lua_scripts/pathmaps/devel/00_default.lua')
-rw-r--r--lua_scripts/pathmaps/devel/00_default.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lua_scripts/pathmaps/devel/00_default.lua b/lua_scripts/pathmaps/devel/00_default.lua
index 938b708..8c9e53a 100644
--- a/lua_scripts/pathmaps/devel/00_default.lua
+++ b/lua_scripts/pathmaps/devel/00_default.lua
@@ -8,7 +8,7 @@
-- Rule file interface version, mandatory.
--
-rule_file_interface_version = "17"
+rule_file_interface_version = "18"
----------------------------------
tools = tools_root
@@ -461,7 +461,7 @@ simple_chain = {
-- -----------------------------------------------
-- 90. Top-level directories that must not be mapped:
{prefix = "/dev", use_orig_path = true},
- {prefix = "/proc", use_orig_path = true},
+ {dir = "/proc", custom_map_funct = sb2_procfs_mapper},
{prefix = "/sys",
use_orig_path = true, readonly = true},
@@ -514,7 +514,7 @@ qemu_chain = {
{prefix = "/tmp", map_to = session_dir},
{prefix = "/dev", use_orig_path = true},
- {prefix = "/proc", use_orig_path = true},
+ {dir = "/proc", custom_map_funct = sb2_procfs_mapper},
{prefix = "/sys", use_orig_path = true},
{prefix = "/etc/resolv.conf",