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

[sp_Blitz] [Bug] Permissions checks are not working as intended #3377

Closed
Montro1981 opened this issue Oct 11, 2023 · 2 comments · Fixed by #3379, #3380 or #3381
Closed

[sp_Blitz] [Bug] Permissions checks are not working as intended #3377

Montro1981 opened this issue Oct 11, 2023 · 2 comments · Fixed by #3379, #3380 or #3381
Assignees

Comments

@Montro1981
Copy link
Contributor

Version of the script
8.17
20231010

What is the current behavior?
Mea culpa, some of the fixes I made for the permission checks are not working.
😢

  • #3356 Fix for xp_regread #3360 xp_regread doesn't play nice with a TRY CATCH block, so we just have to swallow those errors, they are not breaking the run, they just annoy me in the messages tab but, oh well, that's what we get for using an undocumented stored procedure.
  • #3355 Added permissions check for MSDB #3358 the permission check for the msdb database is to broad
  • Forgot the add a check for [master].[dbo].[sp_MSgetalertinfo]

What is the expected behavior?
Fix the code to correct the issue I introduced.

  • xp_regread, it gets the @powerScheme alright after the first error. The cpu speed not so well. Going to ISNULL the speed to UNKW
  • add additional permission check for the msdb database
  • add permission checkfor [master].[dbo].[sp_MSgetalertinfo]

Will be separate Pull requests per fix.

Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures?
Same errors different day, thus more fixes.

Montro1981 added a commit to Montro1981/SQL-Server-First-Responder-Kit that referenced this issue Oct 11, 2023
Montro1981 added a commit to Montro1981/SQL-Server-First-Responder-Kit that referenced this issue Oct 11, 2023
Montro1981 added a commit to Montro1981/SQL-Server-First-Responder-Kit that referenced this issue Oct 11, 2023
Montro1981 added a commit to Montro1981/SQL-Server-First-Responder-Kit that referenced this issue Oct 11, 2023
Montro1981 added a commit to Montro1981/SQL-Server-First-Responder-Kit that referenced this issue Nov 14, 2023
BrentOzar added a commit that referenced this issue Dec 14, 2023
…it_3377-xp_readreg

#3377 Moved the xp_regread calls back to the check and add some messages to the user
@BrentOzar
Copy link
Member

Looks good! Thanks for the pull request. Merging into the dev branch, will be in the next release with credit to you in the release notes.

@BrentOzar BrentOzar added this to the 2023-12 Release milestone Dec 14, 2023
BrentOzar added a commit that referenced this issue Dec 14, 2023
…it_3377-msdb_Permissions

#3377 Expanded msdb permission checks
BrentOzar added a commit that referenced this issue Jan 10, 2024
…it_3377-sp_MSgetalertinfo

#3377 Added a check for sp_MSgetalertinfo
@BrentOzar
Copy link
Member

Thanks for the modified pull request! Looks good, works on my machine, heh. Merging into dev, will be in the next release with credit to you in the release notes.

If I don't remember "Martin", remind me again the next time you see me live, heh. I'm terrible with names, and Montro1981 is so memorable, oddly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment