-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
X bit support #61
Conversation
[ps hold tight on accepting this, dealing with rubocop complaints and such -- going to condense the commits once i finish resolving it] |
Ok we should be good! |
@@ -1,5 +1,6 @@ | |||
require 'set' | |||
require 'pathname' | |||
require 'English' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. ^_^
@@ -1,5 +1,6 @@ | |||
require 'set' | |||
require 'pathname' | |||
require 'English' |
There was a problem hiding this comment.
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
lib/puppet/type/posix_acl.rb
Outdated
def set_insync(cur_perm) # rubocop:disable Style/AccessorMethodName | ||
should = @should.uniq.sort | ||
should = @should.uniq.map(&:downcase).sort |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent catch =D Changed!
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