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

revoking GRANT privilege fix #880

Merged
merged 3 commits into from
Sep 2, 2016
Merged

revoking GRANT privilege fix #880

merged 3 commits into from
Sep 2, 2016

Conversation

bodik
Copy link
Contributor

@bodik bodik commented Aug 27, 2016

hello,

while trying to implement some basic stuff on mysql/identity management (account lifecycle present,disabled,absent) I came across on a not nice behavior. If user is ever granted a granting option, those cannot be revoked in a fine manner. the "feature" itself is not documented because it's more like side effect.

testcase:

  1. mysql_grant( ... options=>['GRANT'])
  2. grant is present
  3. mysql_grant( ... options=>[])
    3a. mysql_grant( ...)
  4. grant is present
  5. mysql_grant( ... options=>"")
  6. grant is revoked
  7. mysql_grant( ... options=>"")
  8. grant is revoked again
    ... its revoked everytime

This patch proposes a more proper handling options attribute on grant resource. Initialize option everytime even if it's not present, NONE keyword is not honored in providers cmd_options, so it does not matter and it's backward compatible.

the test and results before and after applying this patch is attached

grandfix1-testlog.txt

@bmjen bmjen merged commit 20dc64f into puppetlabs:master Sep 2, 2016
@bmjen
Copy link
Contributor

bmjen commented Sep 2, 2016

Thanks @bodik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants