Fixing #9511 multiple PID's cause unary operator expected
Fix #9511 multiple PID's cause unary operator expected
Merge branch 'fix-init-script' of https://github.com/dmyerscough/salt into fix-init-script
Fix #9511 multiple PID's cause unary operator expected
Merge pull request #9588 from dmyerscough/fix-init-script

Fix init script
Make mysql returner use json to serializer return

See issue #9590

Using str to serializer data is a bad idea as there is no good way
to safely and reliable deserialize it. JSON allows this, and is what
the postgresql returner uses.
Merge pull request #9591 from davidn/develop

Make mysql returner use json to serializer return
Make the functions only get generated once instead of every pillar
Keep the functions if they are passed in
Merge pull request #9595 from jacksontj/develop

Keep the functions if they are passed in
Break out the function loading into a seperate if block
Merge pull request #9596 from jacksontj/develop

Break out the function loading into a seperate if block
Attempt at fixing some of the pillar platform tests
slight doc reformat on windows install doc page
Merge pull request #9597 from UtahDave/develop

slight doc reformat on windows install doc page
Do! if, not elif
the jobid section CLEARLY does not work, stubbing out for now

I also made the first arguments name and made backdoors for limit
and job arguments
Make sure we load ufnctions in ALL situations
Merge pull request #9598 from jacksontj/develop

Fix for pillar loading and comment update
Fix ownership/perms on salt.utils.copyfile()

When salt.utils.copyfile() uses shutil.move() to move the target file to
the destination, the ownership/permissions from the original file that
existed at the destination path are not preserved. For security reasons,
files cached locally and compared to existing files in file.managed
states are created with ownership of root:root (or user:primarygroup, if
the master is running as non-root), with a mode of 600.

Normally, this would not be an issue since
salt.modules.file.check_perms() is invoked to correct the ownership and
permissions. However, recent modifications to that function have
resulted in the ownership/permissions not being modified if these
parameters are passed to check_perms() as None.

Since the user, group, and mode default to None in file.managed states,
if they are not explicitly defined in a state, this results in is the
newly-created file overwriting the old file, and the
ownership/permissions being left untouched.

This commit modifies salt.utils.copyfile() to restore the old file's
ownership and permissions after shutil.move is invoked to replace the
old file with the new one.

Fixes #9527.