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

X bit support #61

Merged
merged 3 commits into from
Jul 28, 2019
Merged

X bit support #61

merged 3 commits into from
Jul 28, 2019

Conversation

jadestorm
Copy link

Pull Request (PR) description

This pull request includes a fix that @pyslarvt made to add rwX style settings that didn't appear to make it into a formal PR. The fix as-is would frequently leave my hosts updating on every Puppet run. The modifications I made add in support for properly comparison the current permissions set, even if you have the capital X bit set. (note: X is only for setfacl, it's not a "real" posix acl, so you have to lowercase it to do comparisons) This was already handled in the :unset handler, but not in set or exact. Note it is possible that I've missed a few use cases as I don't really use anything but the set action.

I may follow this PR by writing up a quick README as well, depends on what time I have to spare. =)

This Pull Request (PR) fixes the following issues

Fixes #9

@jadestorm
Copy link
Author

[ps hold tight on accepting this, dealing with rubocop complaints and such -- going to condense the commits once i finish resolving it]

@jadestorm
Copy link
Author

Ok we should be good!

@@ -1,5 +1,6 @@
require 'set'
require 'pathname'
require 'English'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gives you $LAST_MATCH_INFO

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And really the only reason I switched from $~ to $LAST_MATCH_INFO because rubocop yelled at me and questioned my lineage. ^_^

@bastelfreak bastelfreak added enhancement New feature or request needs-feedback Further information is requested labels Jun 17, 2019
@@ -1,5 +1,6 @@
require 'set'
require 'pathname'
require 'English'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gives you $LAST_MATCH_INFO

def set_insync(cur_perm) # rubocop:disable Style/AccessorMethodName
should = @should.uniq.sort
should = @should.uniq.map(&:downcase).sort
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps better to first downcase and then uniq

Copy link
Author

@jadestorm jadestorm Jun 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent catch =D Changed!

@bastelfreak bastelfreak merged commit fe6c5ca into voxpupuli:master Jul 28, 2019
@bastelfreak bastelfreak removed the needs-feedback Further information is requested label Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Directory +x / Files not +x
5 participants