mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Handle inability to read /proc for ansible_service_mgr. Fixes #18957
This commit is contained in:
parent
5cd7a08418
commit
00859a4ced
1 changed files with 4 additions and 0 deletions
|
@ -335,6 +335,10 @@ class Facts(object):
|
|||
if re.match(r' *[0-9]+ ', proc_1):
|
||||
proc_1 = None
|
||||
|
||||
# The ps command above may return "COMMAND" if the user cannot read /proc, e.g. with grsecurity
|
||||
if proc_1 == "COMMAND\n":
|
||||
proc_1 = None
|
||||
|
||||
if proc_1 is not None:
|
||||
proc_1 = os.path.basename(proc_1)
|
||||
proc_1 = to_native(proc_1)
|
||||
|
|
Loading…
Add table
Reference in a new issue