Merge pull request #7878 from s0undt3ch/0.17

[0.17 cherry-pick] log related stuff + 1 unit test fix
single quotes
Drop sup groups BEFORE changing uid

@basepi, needs cherry-pick
Refs #7422. A marginally hackish (but effective?) way to avoid having to unwrap None vars as args/kwags. This fixes an incorrect assumption that to have kwargs, one would first need to provide kwargs.
Refs #4686. From a cursory scan of this code, I believe the issues that the author raised are still valid.
Fix regresion in disk routines
encoding and docstring for package

Conflicts:
	salt/utils/validate/__init__.py
Fix typo.
Add python_shell flag to cmdmod functions.

The cmdmod functions use shell=True by default. To allow for safer calls
add python_shell=False to the call and pass in the arguments as a
sequence

sudo salt 'dasalt' cmd.run 'ls -lh /'

sudo salt 'dasalt' cmd.run '["ls", "-lh", "/"]' python_shell=False
change 'rvm install' calls not to try sudo if 'runas' is set to non-root user
Add token checks to mine uploads
Add token checks for a number of additional areas

This issue has potentially been mis-represented, all gateways that
control sensitive data about minions have always been cleanly controlled
this addition just prevents a minion from miss-posting data on the
master.

Conflicts:
	salt/master.py
	salt/modules/event.py
	salt/utils/event.py
Fix mine lint errors
Fix mixed tabs with spaces.
Fix PEP-8 E712. `is True`
The test needs to be executed as root to pass.
`os.getcwd()` might thrown an `OSError` if it was deleted or moved.

Let's not fail because of that.
Move gen_token into Auth class for more generic use
Not sure why we are removing a file from the source halfway in a

test, this should fix the failing test, @s0undt3ch, if this break
something I am not seeing please let me know
import skipif