community.general/lib/ansible/plugins/action
Toshio Kuratomi fcd6d7010d Fixup perms dont rely on privileged user named root (#15482)
* Don't rely on username to check for root privileges

The SSH username isn't a reliable way to check if we've got root privileges on
the remote system (think "toor" on FreeBSD). Because of this check, Ansible
previously tried to use the fallback solutions for granting file access (ACLs,
world-readable files) even on systems where it had root privileges when the
remote username didn't match the literal string "root".

Instead of running checks on the username, just try using `chmod` in any case
and fall back to the previous "non-root" solution when that fails.

* Fail if we are root and changing ownership failed

Since this code is security sensitive we document exactly the expected
permissions of the temporary files once this function has run.  That way
if a flaw is found in one end-result we know more precisely what scenarios
are affected and which are not.
2016-04-22 08:40:34 -07:00
..
__init__.py Fixup perms dont rely on privileged user named root (#15482) 2016-04-22 08:40:34 -07:00
add_host.py allow for non standard hostnames 2015-12-21 13:42:34 -05:00
assemble.py Ensure action plugins remove tmp dirs created (#15501) 2016-04-20 13:39:12 -04:00
assert.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00
async.py Ensure action plugins remove tmp dirs created (#15501) 2016-04-20 13:39:12 -04:00
copy.py Ensure action plugins remove tmp dirs created (#15501) 2016-04-20 13:39:12 -04:00
debug.py allow skipping debug depending on verbosity 2016-02-18 06:58:43 -08:00
eos_template.py initial add of action plugin eos_template 2016-02-01 11:51:52 -05:00
fail.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00
fetch.py Fix unicode handling in connection plugins. 2016-03-10 09:04:32 -08:00
group_by.py Do not set 'changed' to True when using group_by 2016-01-04 17:46:40 +01:00
include_vars.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00
ios_template.py initial add of action plugin ios_template 2016-02-01 11:54:02 -05:00
iosxr_template.py adds new action plugin iosxr_template 2016-02-12 17:08:21 -05:00
junos_template.py initial add of new action plugin junos_template 2016-02-11 08:28:35 -05:00
net_template.py Add safety check on _backup key. 2016-02-04 14:47:43 -05:00
normal.py better module error handling 2015-12-22 23:01:56 -05:00
nxos_template.py initial add of action plugin nxos_template 2016-02-01 11:52:50 -05:00
ops_template.py updates the ops_template plugin action backup key 2016-02-28 23:40:05 -05:00
package.py Finish up plugin porting to global display 2015-11-11 10:44:23 -08:00
patch.py Ensure action plugins remove tmp dirs created (#15501) 2016-04-20 13:39:12 -04:00
pause.py avoid issues when stdin is a closed file 2016-03-02 11:58:16 -05:00
raw.py Change the raw module's detection of environment settings. (#15535) 2016-04-21 22:58:07 -04:00
script.py Ensure action plugins remove tmp dirs created (#15501) 2016-04-20 13:39:12 -04:00
set_fact.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00
synchronize.py added suport rsync protocol (#12197) 2016-04-08 11:42:07 -04:00
template.py Ensure action plugins remove tmp dirs created (#15501) 2016-04-20 13:39:12 -04:00
unarchive.py Ensure action plugins remove tmp dirs created (#15501) 2016-04-20 13:39:12 -04:00
win_copy.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00
win_template.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00