Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/windows-acl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/windows-acl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ 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');
expect(parseGrantedPrincipals(output, path)).toEqual([
'Everyone',
'NT AUTHORITY\\SYSTEM',
'BUILTIN\\Administrators',
'DESKTOP-CP9J2I4\\Bohdan Triapitsyn',
'EXAMPLE-PC\\Sam',
]);
});

Expand Down
Loading