mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-03 04:34:24 -07:00
Verify /proc/modules is readable (issue #2990)
This commit is contained in:
parent
0c03a5cfc2
commit
00b3a450c7
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue