Skip to content
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

File state: skip symlink file permissions on linux #57782

Merged
merged 5 commits into from Jul 29, 2020

Conversation

DmitryKuzmenko
Copy link
Contributor

What does this PR do?

Ignore file permissions for symlinks on linux if follow_symlinks is False since it does not allow permission change.

What issues does this PR fix or reference?

Fixes: #55878

Previous Behavior

file.directory state always reports permission changes on symlinks when follow_symlinks = True and it is targeted to a symlink or recursively targeted to a directory containing a symlink if dir_mode is different from 0o777. See #55878 for details.

New Behavior

file.directory reports no change when it's not expected.

Merge requirements satisfied?

Commits signed with GPG?

Yes

Since we can not change symlink file mode on linux do not check it
to not report the difference between real and desired mode as a
change.
@DmitryKuzmenko DmitryKuzmenko requested a review from a team as a code owner June 24, 2020 13:02
@ghost ghost requested review from dwoz and removed request for a team June 24, 2020 13:02
@sagetherage sagetherage added v3001.1 vulnerable version Magnesium Mg release after Na prior to Al python3 regarding Python 3 support and removed v3001.1 vulnerable version labels Jul 16, 2020
dwoz
dwoz approved these changes Jul 29, 2020
@dwoz dwoz merged commit 77fc3ec into saltstack:master Jul 29, 2020
26 checks passed
@DmitryKuzmenko DmitryKuzmenko deleted the bugs/issue_55878 branch October 23, 2020 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Magnesium Mg release after Na prior to Al python3 regarding Python 3 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Py3 file.directory Handles Symlinks Improperly
3 participants