Commit 3ce0758
test(windows-service): compare IPC ACL by canonical SID instead of SDDL alias
The hardening_script_removes_stale_aces test read the resulting DACL back
via GetSecurityDescriptorSddlForm and checked for the current user's raw
SID as a substring. When the test runs as the built-in Administrator
(RID 500), SDDL abbreviates that account to the `LA` alias, so the
raw-SID check failed even though the ACE was correct.
Enumerate the access rules with explicit SecurityIdentifier identities so
SYSTEM, Admins, and the current user compare by canonical SID regardless
of SDDL aliasing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent d4fabfe commit 3ce0758
1 file changed
Lines changed: 32 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
145 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
149 | 155 | | |
150 | | - | |
151 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
152 | 165 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | 166 | | |
157 | | - | |
158 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
159 | 181 | | |
160 | 182 | | |
161 | 183 | | |
| |||
0 commit comments