problems in running wireshark with sudo or gksudo

Bug #780543 reported by Deivid
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
wireshark (Ubuntu)
Confirmed
Undecided
Unassigned

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 2.6.38.2
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)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=pt_BR.UTF-8
 LC_MESSAGES=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: wireshark
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Deivid (deividat) wrote :
Revision history for this message
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")

Revision history for this message
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
end

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in wireshark (Ubuntu):
status: New → Confirmed
Revision history for this message
kapetr (kapetr) wrote :

U12.10 - persist

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.