Support non-elevated admin user check on Windows#7200
Open
tyrielv wants to merge 1 commit intolibgit2:mainfrom
Open
Support non-elevated admin user check on Windows#7200tyrielv wants to merge 1 commit intolibgit2:mainfrom
tyrielv wants to merge 1 commit intolibgit2:mainfrom
Conversation
Currently, if a repository is owned by the Administrators group, libgit2 only considers the current user to be the owner if the process is running with elevated privileges. This change allows non-elevated processes run by users who are members of the Administrators group to also be considered the owner of such repositories. For the corresponding fix in git.exe see git/git@03a4e46
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.
Currently, if a repository is owned by the Administrators group, libgit2 only considers the current user to be the owner if the process is running with elevated privileges. This change allows non-elevated processes run by users who are members of the Administrators group to also be considered the owner of such repositories.
This is related to #6279. As noted there, libgit2 strives to be bug-for-bug compatible with git -
for the corresponding change in git see
git/git@03a4e46
I did not make test changes because the existing tests for this scenario mock the token state above the level of these changes - actually running this code with linked administrator tokens isn't feasible without major changes to the test infrastructure.