wireshark/epan/wslua
Peter Wu 8d7876bace wslua: do not partially disable the Lua API when run as root
Users should not be starting Wireshark as root user (sudo or root
login). If they do, then they can already execute arbitrary code via C
plugins, or read and write arbitrary files. Limiting the Lua API will
not really help these users to prevent breaking their system further.

Therefore remove all artificial restrictions and allow users to run
user-supplied scripts by default. If for whatever policy reason this
flag is set to false, then only Lua dissectors from the global system
directory are executed. It is their responsibility not to provide a free
root shell to the user.

Note that "running_superuser" will also be true if setuid root while the
effective and real user is no longer root. This happens due to
relinquish_special_privs_perm(). In this case, disabling the Lua API is
just annoying with no benefits.

Change-Id: Ie8a38e6160d861f02cbb70dcd1d90462153f4665
Link: https://www.wireshark.org/lists/wireshark-dev/201902/msg00004.html
Reviewed-on: https://code.wireshark.org/review/31913
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-07 10:30:06 +00:00
..
.editorconfig
CMakeLists.txt CMake: Simplify CMAKE_INSTALL_DATADIR usage 2018-12-03 22:35:37 +00:00
console.lua Lua: remove various logging functions (debug, warn, etc.) 2018-09-07 04:02:45 +00:00
dtd_gen.lua
init_wslua.c wslua: Improve syntax error message 2019-01-28 13:22:22 +00:00
init_wslua.h epan: Remove unnecessary all protocols registration callback 2018-08-29 23:22:44 +00:00
lrexlib.c
lrexlib.h
lrexlib_algo.h
lrexlib_glib.c
lrexlib_glib_f.c
lua_bitop.c Revert "Some older compilers don't allow diagnostic pragmas inside a function." 2018-09-12 16:29:30 +00:00
lua_bitop.h
make-init-lua.pl wslua: Update wslua_register_menu() documentation 2019-01-29 05:47:05 +00:00
make-reg.pl
make-taps.pl
taps Rename packet-ssl* to packet-tls* 2018-09-25 13:24:17 +00:00
template-init.lua wslua: do not partially disable the Lua API when run as root 2019-02-07 10:30:06 +00:00
wslua.h wslua: fix memleaks related to Proto and Pref 2019-01-27 09:43:05 +00:00
wslua_address.c lua: add support for ethernet addresses to the Address class 2018-10-18 07:51:36 +00:00
wslua_byte_array.c epan: Guard g_base64_decode_inplace() against zero length string 2018-09-05 17:19:42 +00:00
wslua_capture_info.c wslua: register attributes along with their class 2019-01-21 11:51:01 +00:00
wslua_column.c
wslua_dir.c
wslua_dissector.c
wslua_dumper.c wiretap: fix memleaks with wtap_rec::opt_comment 2019-01-25 04:53:10 +00:00
wslua_field.c wslua_field: fix memory leaks in Field_new 2019-01-26 19:43:05 +00:00
wslua_file.c wslua: register attributes along with their class 2019-01-21 11:51:01 +00:00
wslua_file_common.c
wslua_file_common.h
wslua_file_handler.c wslua_file_handler: fix leak of opt_comment 2019-01-26 07:42:00 +00:00
wslua_frame_info.c wslua_file_handler: fix leak of opt_comment 2019-01-26 07:42:00 +00:00
wslua_gui.c wslua: Update wslua_register_menu() documentation 2019-01-29 05:47:05 +00:00
wslua_int64.c
wslua_internals.c wslua: register attributes along with their class 2019-01-21 11:51:01 +00:00
wslua_listener.c wslua_listener: fix memleak in tap packet callback 2019-01-27 09:40:56 +00:00
wslua_nstime.c wslua_nstime: fix memleak for bad arguments to NSTime 2019-01-26 09:07:32 +00:00
wslua_pinfo.c wslua_pinfo: fix memleaks on setting addresses in Pinfo 2019-01-27 09:43:44 +00:00
wslua_pinfo_common.h
wslua_pref.c wslua: fix memleaks related to Proto and Pref 2019-01-27 09:43:05 +00:00
wslua_proto.c wslua: Don't defer deletion of subtree indexes 2019-01-29 14:30:37 +00:00
wslua_proto_expert.c
wslua_proto_field.c wslua: fix memleak of unregistered ProtoField field 2019-01-27 09:43:26 +00:00
wslua_struct.c
wslua_tree.c wslua: register attributes along with their class 2019-01-21 11:51:01 +00:00
wslua_tvb.c
wslua_util.c Revert "Add routines to load Lua programs that assume the path is UTF-8 on Windows." 2018-12-30 07:49:22 +00:00