1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Verify /proc/modules is readable (issue #2990)

This commit is contained in:
Stephen Fromm 2013-05-30 10:15:40 -07:00
parent 0c03a5cfc2
commit 00b3a450c7

View file

@ -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)