Commit e36ab76
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 <[email protected]>1 parent 0e021a3 commit e36ab76
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3499 | 3499 | | |
3500 | 3500 | | |
3501 | 3501 | | |
| 3502 | + | |
3502 | 3503 | | |
3503 | 3504 | | |
3504 | 3505 | | |
| |||
3507 | 3508 | | |
3508 | 3509 | | |
3509 | 3510 | | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
3510 | 3520 | | |
3511 | 3521 | | |
3512 | 3522 | | |
| |||
0 commit comments