problems in running wireshark with sudo or gksudo

Bug #780543 reported by Deivid on 2011-05-10
This bug affects 3 people
Affects Status Importance Assigned to Milestone
wireshark (Ubuntu)

Bug Description

Binary package hint: wireshark

wireshark to be useful, must be run with sudo or gksudo.
the problem is that when you open it using sudo or gksudo it displays the following error message:

Lua: Error during loading:
 [string "/usr/share/wireshark/init.lua"]:45: dofile has been disabled

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: wireshark 1.4.6-1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Tue May 10 11:10:26 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
 PATH=(custom, user)
SourcePackage: wireshark
UpgradeStatus: No upgrade log present (probably fresh install)

Deivid (deividat) wrote :
George Calianu (george-calianu) wrote :

a small workaround can be done by edit /etc/wireshark/init.lua with superuser rights and put in comment penultimate line like that:

 -- dofile("console.lua")

Deivid (deividat) wrote :

dofile function has been disabled at line 45 in /etc/wireshark/init.lua when run as superuser:

-- disable potentialy harmful lua functions when running superuser
if running_superuser then
    local disabled_lib = {}
    setmetatable(disabled_lib,{ __index = function() error("this package has been disabled") 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
    os = disabled_lib
    io = disabled_lib
    file = disabled_lib

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wireshark (Ubuntu):
status: New → Confirmed
kapetr (kapetr) wrote :

U12.10 - persist

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers