Skip to content

Extend safe.directory admin-owner check to also cover non-elevated processes#7273

Open
csware wants to merge 1 commit into
libgit2:mainfrom
csware:safe-directory-admin-owned
Open

Extend safe.directory admin-owner check to also cover non-elevated processes#7273
csware wants to merge 1 commit into
libgit2:mainfrom
csware:safe-directory-admin-owned

Conversation

@csware
Copy link
Copy Markdown
Contributor

@csware csware commented May 22, 2026

The current implementation which checks whether the current user is in the administrators group only works if the process runs elevated.

Another check using a so-called "linked token" is necessary which exists when administrators run in non-elevated mode.

Based on Git commit 03a4e46d122d5f24b6e1cd872eb996851c1563da.

@csware
Copy link
Copy Markdown
Contributor Author

csware commented May 22, 2026

I found no documentation whether or how the handle needs to be freed.

…ted processes

The current implementation which checks whether the current user is in the administrators group only works if the process runs elevated.

Another check using a so-called "linked token" is necessary which exists when administrators run in non-elevated mode.

Based on Git commit 03a4e46d122d5f24b6e1cd872eb996851c1563da.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
@csware csware force-pushed the safe-directory-admin-owned branch from e74dbc4 to 38ce4c8 Compare May 22, 2026 10:17
@sonarqubecloud
Copy link
Copy Markdown

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