Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

Support non-elevated admin user check on Windows#7200

Open
tyrielv wants to merge 1 commit intolibgit2:mainfrom
tyrielv:tyrielv/admin-non-elevated
Open

Support non-elevated admin user check on Windows#7200
tyrielv wants to merge 1 commit intolibgit2:mainfrom
tyrielv:tyrielv/admin-non-elevated

Conversation

@tyrielv
Copy link
Contributor

@tyrielv tyrielv commented Jan 23, 2026

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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant