Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
788ac511
Commit
788ac511
authored
Feb 17, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sanitize sudo success_key from stdout for raw/script modules
Fixes #5533 Closes #5605 Closes #5606 Closes #5607
parent
05b6b248
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
lib/ansible/runner/action_plugins/raw.py
+8
-3
No files found.
lib/ansible/runner/action_plugins/raw.py
View file @
788ac511
...
...
@@ -43,6 +43,11 @@ class ActionModule(object):
executable
=
v
module_args
=
r
.
sub
(
""
,
module_args
)
return
ReturnData
(
conn
=
conn
,
result
=
self
.
runner
.
_low_level_exec_command
(
conn
,
module_args
,
tmp
,
sudoable
=
True
,
executable
=
executable
)
)
result
=
self
.
runner
.
_low_level_exec_command
(
conn
,
module_args
,
tmp
,
sudoable
=
True
,
executable
=
executable
)
# for some modules (script, raw), the sudo success key
# may leak into the stdout due to the way the sudo/su
# command is constructed, so we filter that out here
if
result
.
get
(
'stdout'
,
''
)
.
startswith
(
'SUDO-SUCCESS-'
):
result
[
'stdout'
]
=
re
.
sub
(
r'^SUDO-SUCCESS.*(\r)?\n'
,
''
,
result
[
'stdout'
])
return
ReturnData
(
conn
=
conn
,
result
=
result
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment