mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
fixes remote code execution for su/sudo and strict remote umasks
* temporarily changes umask for creating temporary directories * otherwise parent directories may not get chmod'ed and end up unreadable refs #9902
This commit is contained in:
parent
e505a1b7c4
commit
d9aa14feea
2 changed files with 8 additions and 3 deletions
|
@ -144,7 +144,7 @@ class ActionBase:
|
|||
|
||||
tmp_mode = None
|
||||
if self._play_context.remote_user != 'root' or self._play_context.become and self._play_context.become_user != 'root':
|
||||
tmp_mode = 'a+rx'
|
||||
tmp_mode = 0755
|
||||
|
||||
cmd = self._connection._shell.mkdtemp(basefile, use_system_tmp, tmp_mode)
|
||||
self._display.debug("executing _low_level_execute_command to create the tmp path")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue