Commit c4ea552
mingw: handle a file owned by the Administrators group correctly
When an Administrator creates a file or directory, the created
file/directory is owned not by the Administrator SID, but by the
_Administrators Group_ SID. The reason is that users with administrator
privileges usually run in unprivileged ("non-elevated") mode, and their
user SID does not change when running in elevated mode.
This is is relevant e.g. when running a GitHub workflow on a build
agent, which runs in elevated mode: cloning a Git repository in a script
step will cause the worktree to be owned by the Administrators Group
SID, for example.
Let's handle this case as following: if the current user is an
administrator, Git should consider a worktree owned by the
Administrators Group as if it were owned by said user.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent 9deb248 commit c4ea552
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3514 | 3514 | | |
3515 | 3515 | | |
3516 | 3516 | | |
| 3517 | + | |
3517 | 3518 | | |
3518 | 3519 | | |
3519 | 3520 | | |
| |||
3522 | 3523 | | |
3523 | 3524 | | |
3524 | 3525 | | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
3525 | 3535 | | |
3526 | 3536 | | |
3527 | 3537 | | |
| |||
0 commit comments