Merge pull request #3064 from sfromm/issue2990

Verify /proc/modules is readable (issue #2990)
pull/3060/merge
Michael DeHaan 12 years ago
commit ad1a02aa55

@ -1633,7 +1633,7 @@ class LinuxVirtual(Virtual):
return return
# Beware that we can have both kvm and virtualbox running on a single system # Beware that we can have both kvm and virtualbox running on a single system
if os.path.exists("/proc/modules"): if os.path.exists("/proc/modules") and os.access('/proc/modules', os.R_OK):
modules = [] modules = []
for line in open("/proc/modules").readlines(): for line in open("/proc/modules").readlines():
data = line.split(" ", 1) data = line.split(" ", 1)

Loading…
Cancel
Save