community.general/lib/ansible
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
..
cli fixes to vault/copy 2016-04-14 14:12:48 -04:00
compat Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
config Making the switch to v2 2015-05-03 21:47:26 -05:00
errors Add options to make includes 'static' 2016-03-24 10:12:51 -04:00
executor Make ziploader handle python packages as well as python modules 2016-04-19 20:10:51 -07:00
galaxy Fix issue with ansible-galaxy and --ignore-certs 2016-04-11 01:17:15 -04:00
inventory removed unused section regex, corrected group one 2016-04-20 11:52:50 -04:00
module_utils Set the name of the user_agent in each mangement client. 2016-04-21 17:51:28 -04:00
modules submodule ref update 2016-04-21 16:30:27 -04:00
new_inventory fix some warning of undefined name. 2015-10-09 12:43:42 +08:00
parsing Trnasform file name to bytes before opening it to avoid unicode errors if python tries to encode it implicitly 2016-04-19 08:33:01 -07:00
playbook Make the loop variable (item by default) settable per task 2016-04-19 01:42:40 -04:00
plugins Fixup perms dont rely on privileged user named root (#15482) 2016-04-22 08:40:34 -07:00
template moved last utils.debug to display.debug 2016-04-08 16:00:36 -04:00
utils Adding docker doc frag (#15494) 2016-04-20 13:56:19 -04:00
vars Fix var precedence bug introduced in ff9f5d7d 2016-04-19 12:40:31 -04:00
__init__.py Bump version in devel now that stable-2.0 has been branched 2015-12-02 17:57:53 +05:30
constants.py Controller-side module caching. 2016-04-12 08:01:07 -07:00
test-requirements.txt Making the switch to v2 2015-05-03 21:47:26 -05:00