New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2017.7] fixes to module/file.py #48399

Merged
merged 2 commits into from Jul 6, 2018

Conversation

Projects
None yet
3 participants
@garethgreenaway
Member

garethgreenaway commented Jul 1, 2018

What does this PR do?

Setting the mode with setuid or setgid bits in addition to setting the owner and group will force the setuid & setgid bits to reset. This change ensures that we set the mode after setting the owner & group.

What issues does this PR fix or reference?

#48336

Previous Behavior

Setuid and setgid bits were wiped out with the chown action.

New Behavior

Chown is done last, preserving the chmod actions.

Tests written?

Yes

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

Setting the mode with setuid or setgid bits in addition to setting th…
…e owner and group will force the setuid & setgid bits to reset. This change ensures that we set the mode after setting the owner & group.

@garethgreenaway garethgreenaway requested review from rallytime and Ch3LL Jul 1, 2018

@rallytime

This comment has been minimized.

@Ch3LL

Ch3LL approved these changes Jul 6, 2018

@rallytime rallytime merged commit acf4286 into saltstack:2017.7 Jul 6, 2018

5 of 10 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
default Build finished.
Details
jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #6186 — FAILURE
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #11156 — FAILURE
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #20239 — FAILURE
Details
WIP ready for review
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #26397 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #18434 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #24114 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #23069 — SUCCESS
Details

@rallytime rallytime referenced this pull request Jul 6, 2018

Closed

file.directory #48336

rallytime added a commit to rallytime/salt that referenced this pull request Jul 10, 2018

Fix up bad merge - remove extra section of "mode" changes
This came through in a merge-forward due to saltstack#48398 and saltstack#48399

Both PRs moved the "mode" section in file.check_perms down lower,
but when the merge-forward went through, the section got added
back again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment