@slatesvideo/shared 0.7.15 → 0.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.js +6 -3
- package/dist/manual/content.d.ts +1 -1
- package/dist/manual/content.js +1 -1
- package/dist/operations/index.d.ts +4 -4
- package/package.json +1 -1
package/dist/auth.js
CHANGED
|
@@ -44,9 +44,11 @@ export function readDefaultProjectId() {
|
|
|
44
44
|
return readConnection().defaultProjectId ?? null;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Windows:
|
|
48
|
-
*
|
|
49
|
-
*
|
|
47
|
+
* Windows: leave the current user the only entry on `path`. `/reset` first, because `/inheritance:r`
|
|
48
|
+
* keeps a file's own entries, and a file made in a folder that hands nothing down starts with explicit
|
|
49
|
+
* SYSTEM and Administrators ones. The profile folder's ACL is no wall: Codex's sandbox group can read
|
|
50
|
+
* it. Full paths, because Git for Windows puts its own `whoami` first on PATH. A failure warns and
|
|
51
|
+
* carries on, so a locked-down machine can still sign in.
|
|
50
52
|
*/
|
|
51
53
|
function restrictToCurrentUser(path) {
|
|
52
54
|
const system32 = join(process.env.SystemRoot ?? 'C:\\Windows', 'System32');
|
|
@@ -55,6 +57,7 @@ function restrictToCurrentUser(path) {
|
|
|
55
57
|
const sid = /"(S-1-[\d-]+)"/.exec(whoami)?.[1];
|
|
56
58
|
if (!sid)
|
|
57
59
|
throw new Error(`no SID in ${whoami}`);
|
|
60
|
+
execFileSync(join(system32, 'icacls.exe'), [path, '/reset'], { stdio: 'ignore', windowsHide: true });
|
|
58
61
|
execFileSync(join(system32, 'icacls.exe'), [path, '/inheritance:r', '/grant:r', `*${sid}:F`], { stdio: 'ignore', windowsHide: true });
|
|
59
62
|
}
|
|
60
63
|
catch (error) {
|