Fix User vs Login for granting exec to "xp_cmdshell"#3720
Merged
CarlRabeler merged 1 commit intoMicrosoftDocs:livefrom Dec 2, 2019
Merged
Fix User vs Login for granting exec to "xp_cmdshell"#3720CarlRabeler merged 1 commit intoMicrosoftDocs:livefrom
CarlRabeler merged 1 commit intoMicrosoftDocs:livefrom
Conversation
1. `GRANT` statement included reference to "login" when login's cannot be granted permissions on schema-bound objects.
2. The final sentence of that paragraph stated that the login (being granted the permission) needed to be mapped to a user in the `master` database. Yes, a user does need to exist in `master`, but again, this has nothing to do with logins:
1. The user does not even need to have an associated login (even if that will be the case in 99.99% of cases)
2. If the user does have an associated login, the names don't need to be the same, so the focus can't be on login because you have to use the "user" name, not the "login" name.
Example code will be in the PR.
Contributor
|
@srutzky : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
Contributor
|
@srutzky thanks for this update and excellent commentary |
Contributor
Author
|
@CarlRabeler You are quite welcome 😺 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #3719 .
These two changes regard Item # 3 under "Permissions" on the "xp_cmdshell" page. That paragraph is currently as follows:
GRANTstatement includes reference to "login" when logins cannot be granted permissions on schema-bound objects.The final sentence of that paragraph states that the login (being granted the permission) needs to be mapped to a user in the
masterdatabase. Yes, a user does need to exist inmaster, but again, this has nothing to do with logins:master, then it would work to grant permission to the login (assuming different names between login and user such that this is a meaningful distinction). { see example 1 }The following example shows:
master, still can't be granted permission.The following test shows that a user does not even need to have an associated login in order to be granted permission to use
xp_cmdshell:Take care,
Solomon...
https://SqlQuantumLift.com/
https://SqlQuantumLeap.com/
https://SQLsharp.com/