aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorBalint Reczey <balint.reczey@ericsson.com>2012-06-22 15:18:03 +0000
committerBalint Reczey <balint.reczey@ericsson.com>2012-06-22 15:18:03 +0000
commitb90a1b7f632ea01939237a9b131a289b0d8e7b35 (patch)
tree47d1e20a6ee646e9d5a503989484b8d8b0af73db /epan
parent557ed446c9660f6a4544dc3d0a9e5ceed99ae645 (diff)
Give hint to check http://wiki.wireshark.org/CaptureSetup/CapturePrivileges in Lua error messages related to running Wireshark as root
svn path=/trunk/; revision=43442
Diffstat (limited to 'epan')
-rw-r--r--epan/wslua/template-init.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/wslua/template-init.lua b/epan/wslua/template-init.lua
index 184c73aa66..c4fcc7d5ce 100644
--- a/epan/wslua/template-init.lua
+++ b/epan/wslua/template-init.lua
@@ -39,13 +39,14 @@ run_user_scripts_when_superuser = false
-- disable potentialy harmful lua functions when running superuser
if running_superuser then
+ local hint = "has been disabled due to running Wireshark as superuser. See http://wiki.wireshark.org/CaptureSetup/CapturePrivileges for help in running Wireshark as an unprivileged user."
local disabled_lib = {}
- setmetatable(disabled_lib,{ __index = function() error("this package has been disabled") end } );
+ setmetatable(disabled_lib,{ __index = function() error("this package ".. hint) end } );
- dofile = function() error("dofile has been disabled") end
- loadfile = function() error("loadfile has been disabled") end
- loadlib = function() error("loadlib has been disabled") end
- require = function() error("require has been disabled") end
+ dofile = function() error("dofile " .. hint) end
+ loadfile = function() error("loadfile " .. hint) end
+ loadlib = function() error("loadlib " .. hint) end
+ require = function() error("require " .. hint) end
os = disabled_lib
io = disabled_lib
file = disabled_lib