Repository navigation
Commit 655e4da
Add Win32 NTFS Owner view to the Cygwin ownership-display step
The ownership-display step on `cygwin-test.yml` previously reported
file ownership only via Cygwin's `ls -ld`. That goes through Cygwin's
SID-to-uid mapping (well-known SIDs by RID; machine-local accounts by
`0x30000 + RID`). The mapping is deterministic and reversible, so in
principle one can recover the actual NTFS Owner SID from what Cygwin
prints. But it is a step removed from a direct Win32-API observation,
and that distance has made several preceding diagnostic experiments
in this chain effectively "Cygwin's view of NTFS ownership," not
direct verification that what Cygwin calls `Administrators` really
is `BUILTIN\Administrators` (S-1-5-32-544) and what it calls
`runneradmin(197108)` really is the local Administrator account
(S-1-5-21-...-500).
Add a parallel block to the same step that uses Cygwin's interop to
shell out to `powershell.exe -Command "(Get-Acl ...).Owner"` for the
same set of paths. The output is the NTAccount form
(`BUILTIN\Administrators`, `<machine>\runneradmin`, etc.) of the
SID Win32 itself records, with no Cygwin layer in between.
This is a permanent addition to the kept ownership-display step --
having both views side by side in every Cygwin CI run is more
informative than either alone, and serves as a built-in sanity check
on Cygwin's mapping in case it ever drifts.
The corresponding step in `pythonpackage.yml` (Windows-native) uses
Git Bash MSYS2 `ls`, which has the same class of indirection and
arguably benefits from the same enhancement -- left for a follow-up
if useful, since the load-bearing observations for the bug this
chain fixes are all on the Cygwin runner.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9825828 commit 655e4da
1 file changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
102 | 136 | | |
103 | 137 | | |
104 | 138 | | |
| |||
0 commit comments