From 25d31b057ed45cbe6cc78bf8014bb517fd1aea08 Mon Sep 17 00:00:00 2001 From: yulia-ivashko Date: Fri, 7 Aug 2026 16:16:10 +0300 Subject: [PATCH] Use a fixture account in the access-list tests, not this machine's MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sample `icacls` output was pasted from the machine the feature was written on, so a real hostname and account name went into a public repository as test data. Neither tells the reader anything the fixture needs: what matters is the shape — a path and a first entry sharing one line, indented entries after it, an account name containing a space. Replaced with `EXAMPLE-PC\Sam`. The earlier commit still carries the original in history; rewriting that is a separate decision. --- src/windows-acl.js | 2 +- src/windows-acl.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/windows-acl.js b/src/windows-acl.js index dffe3f1..bacc513 100644 --- a/src/windows-acl.js +++ b/src/windows-acl.js @@ -73,7 +73,7 @@ async function currentAccountSid() { * * C:\…\workspaces Everyone:(OI)(CI)(F) * NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F) - * DESKTOP-CP9J2I4\Bohdan Triapitsyn:(I)(OI)(CI)(F) + * EXAMPLE-PC\Sam:(I)(OI)(CI)(F) * * The path has to come off first: it contains the drive's colon, and a principal may * contain spaces, so there is no separator that tells them apart on that first line. diff --git a/src/windows-acl.test.js b/src/windows-acl.test.js index ae9c2b0..d4337ce 100644 --- a/src/windows-acl.test.js +++ b/src/windows-acl.test.js @@ -29,12 +29,12 @@ describe('windows state protection', () => { }); it('reads every principal out of a list, including one whose name has a space', () => { - const path = 'C:\\Users\\BOHDAN~1\\AppData\\Local\\Temp\\acl-probe'; + const path = 'C:\\Users\\Sam\\AppData\\Local\\Temp\\acl-probe'; const output = [ `${path} Everyone:(OI)(CI)(F)`, ' NT AUTHORITY\\SYSTEM:(I)(OI)(CI)(F)', ' BUILTIN\\Administrators:(I)(OI)(CI)(F)', - ' DESKTOP-CP9J2I4\\Bohdan Triapitsyn:(I)(OI)(CI)(F)', + ' EXAMPLE-PC\\Sam:(I)(OI)(CI)(F)', '', 'Successfully processed 1 files; Failed processing 0 files', ].join('\r\n'); @@ -42,7 +42,7 @@ describe('windows state protection', () => { 'Everyone', 'NT AUTHORITY\\SYSTEM', 'BUILTIN\\Administrators', - 'DESKTOP-CP9J2I4\\Bohdan Triapitsyn', + 'EXAMPLE-PC\\Sam', ]); });