diff options
author | Lauri Aarnio <Lauri.Aarnio@iki.fi> | 2009-01-20 16:58:18 +0200 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2009-02-10 08:38:09 +0200 |
commit | 86819da08f67b3f59c09dd68a2c3414e17d99a26 (patch) | |
tree | 8b82d12b31e2c38bf4c4b3c5230f45144229cd33 | |
parent | 044c2746e7aa38f43870d1e342de3e80530f8d3e (diff) |
re-activated reverse mapping (all mapping modes)
- reverse mapping has been disabled since /proc handling was added.
-rw-r--r-- | lua_scripts/create_reverse_rules.lua | 9 | ||||
-rw-r--r-- | lua_scripts/pathmaps/devel/00_default.lua | 6 | ||||
-rw-r--r-- | lua_scripts/pathmaps/emulate/00_default.lua | 3 | ||||
-rw-r--r-- | lua_scripts/pathmaps/install/00_default.lua | 3 | ||||
-rw-r--r-- | lua_scripts/pathmaps/simple/00_default.lua | 6 | ||||
-rw-r--r-- | lua_scripts/pathmaps/tools/00_default.lua | 3 |
6 files changed, 22 insertions, 8 deletions
diff --git a/lua_scripts/create_reverse_rules.lua b/lua_scripts/create_reverse_rules.lua index abd4421..ae79eb3 100644 --- a/lua_scripts/create_reverse_rules.lua +++ b/lua_scripts/create_reverse_rules.lua @@ -23,6 +23,7 @@ -- are not currently supported. allow_reversing = true -- default = create reverse rules. +reversing_disabled_message = "" -- Order of reverse rules is not necessarily the same as order of forward rules function test_rev_rule_position(output_rules, d_path) @@ -69,6 +70,9 @@ function reverse_one_rule(output_rules, rule, n) if (rule.func_name ~= nil) then allow_reversing = false + reversing_disabled_message = string.format( + "Rule '%s' has 'func_name' attribute", + new_rule.name) end local d_path = nil @@ -203,6 +207,7 @@ function print_rules(rules) if (rule.error) then print("\t -- ",rule.error) allow_reversing = false + reversing_disabled_message = rule.error end print("\t},") end @@ -224,6 +229,7 @@ function process_chains(chains_table) print(" -- NOTE: next_chain is not nil,") print(" -- can't create reversing rules") allow_reversing = false + reversing_disabled_message = "next_chain is not nil" else print(" next_chain=nil,") end @@ -256,7 +262,8 @@ function process_chains(chains_table) end print("}") else - print("-- Failed to create reverse rules.") + print("-- Failed to create reverse rules (" .. + reversing_disabled_message .. ")") print("reverse_chains = nil") end end diff --git a/lua_scripts/pathmaps/devel/00_default.lua b/lua_scripts/pathmaps/devel/00_default.lua index 8e4c0da..92b2a1e 100644 --- a/lua_scripts/pathmaps/devel/00_default.lua +++ b/lua_scripts/pathmaps/devel/00_default.lua @@ -502,7 +502,8 @@ simple_chain = { -- ----------------------------------------------- -- 90. Top-level directories that must not be mapped: {prefix = "/dev", use_orig_path = true}, - {dir = "/proc", custom_map_funct = sb2_procfs_mapper}, + {dir = "/proc", custom_map_funct = sb2_procfs_mapper, + virtual_path = true}, {prefix = "/sys", use_orig_path = true, readonly = true}, @@ -555,7 +556,8 @@ qemu_chain = { {prefix = "/tmp", map_to = session_dir}, {prefix = "/dev", use_orig_path = true}, - {dir = "/proc", custom_map_funct = sb2_procfs_mapper}, + {dir = "/proc", custom_map_funct = sb2_procfs_mapper, + virtual_path = true}, {prefix = "/sys", use_orig_path = true}, {prefix = "/etc/resolv.conf", diff --git a/lua_scripts/pathmaps/emulate/00_default.lua b/lua_scripts/pathmaps/emulate/00_default.lua index 250c3f4..3e6d336 100644 --- a/lua_scripts/pathmaps/emulate/00_default.lua +++ b/lua_scripts/pathmaps/emulate/00_default.lua @@ -84,7 +84,8 @@ mapall_chain = { -- {prefix = "/dev", use_orig_path = true}, - {dir = "/proc", custom_map_funct = sb2_procfs_mapper}, + {dir = "/proc", custom_map_funct = sb2_procfs_mapper, + virtual_path = true}, {prefix = "/sys", use_orig_path = true}, {prefix = sbox_dir .. "/share/scratchbox2", diff --git a/lua_scripts/pathmaps/install/00_default.lua b/lua_scripts/pathmaps/install/00_default.lua index bb8a28f..3eddc8a 100644 --- a/lua_scripts/pathmaps/install/00_default.lua +++ b/lua_scripts/pathmaps/install/00_default.lua @@ -31,7 +31,8 @@ default_chain = { { prefix = "/usr/local/bin", func_name = ".*exec.*", map_to = tools_target }, { prefix = "/dev", func_name = "open.*", use_orig_path = true }, - { dir = "/proc", custom_map_funct = sb2_procfs_mapper}, + { dir = "/proc", custom_map_funct = sb2_procfs_mapper, + virtual_path = true}, { prefix = "/sys", use_orig_path = true }, { prefix = session_dir, use_orig_path = true }, diff --git a/lua_scripts/pathmaps/simple/00_default.lua b/lua_scripts/pathmaps/simple/00_default.lua index b8e3434..ad260f3 100644 --- a/lua_scripts/pathmaps/simple/00_default.lua +++ b/lua_scripts/pathmaps/simple/00_default.lua @@ -61,7 +61,8 @@ simple_chain = { {prefix = "/tmp", map_to = session_dir}, {prefix = "/dev", use_orig_path = true}, - {prefix = "/proc", custom_map_funct = sb2_procfs_mapper}, + {prefix = "/proc", custom_map_funct = sb2_procfs_mapper, + virtual_path = true}, {prefix = "/sys", use_orig_path = true}, {prefix = "/etc/resolv.conf", use_orig_path = true}, {prefix = "/etc/apt", map_to = target_root}, @@ -83,7 +84,8 @@ qemu_chain = { {prefix = "/tmp", map_to = session_dir}, {prefix = "/dev", use_orig_path = true}, - {dir = "/proc", custom_map_funct = sb2_procfs_mapper}, + {dir = "/proc", custom_map_funct = sb2_procfs_mapper, + virtual_path = true}, {prefix = "/sys", use_orig_path = true}, {prefix = "/etc/resolv.conf", use_orig_path = true}, {prefix = tools, use_orig_path = true}, diff --git a/lua_scripts/pathmaps/tools/00_default.lua b/lua_scripts/pathmaps/tools/00_default.lua index 0617fb1..b27f8b4 100644 --- a/lua_scripts/pathmaps/tools/00_default.lua +++ b/lua_scripts/pathmaps/tools/00_default.lua @@ -62,7 +62,8 @@ mapall_chain = { -- {prefix = "/dev", use_orig_path = true}, - {dir = "/proc", custom_map_funct = sb2_procfs_mapper}, + {dir = "/proc", custom_map_funct = sb2_procfs_mapper, + virtual_path = true}, {prefix = "/sys", use_orig_path = true}, {prefix = sbox_user_home_dir .. "/.scratchbox2", |