mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-03 17:23:09 +00:00
Merge pull request #3064 from sfromm/issue2990
Verify /proc/modules is readable (issue #2990)
This commit is contained in:
@@ -1633,7 +1633,7 @@ class LinuxVirtual(Virtual):
|
||||
return
|
||||
|
||||
# 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 = []
|
||||
for line in open("/proc/modules").readlines():
|
||||
data = line.split(" ", 1)
|
||||
|
||||
Reference in New Issue
Block a user