From b90a1b7f632ea01939237a9b131a289b0d8e7b35 Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Fri, 22 Jun 2012 15:18:03 +0000 Subject: 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 --- epan/wslua/template-init.lua | 11 ++++++----- 1 file 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 -- cgit v1.2.3