node-command 2.0.10 → 2.0.11
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/lib/setup.mjs +10 -1
- package/package.json +5 -12
package/lib/setup.mjs
CHANGED
|
@@ -296,7 +296,16 @@ function linuxPairedInstallation(io = fs) {
|
|
|
296
296
|
} finally { io.closeSync(fd); }
|
|
297
297
|
};
|
|
298
298
|
check(app, true);
|
|
299
|
-
|
|
299
|
+
const libexec = helperRoot + '/libexec';
|
|
300
|
+
const requiredLibexecEntries = ['nc-linux-peercred', 'privileged-helper'];
|
|
301
|
+
const managedSealedSnapshot = name => {
|
|
302
|
+
if (!/^privileged-helper-sealed-[0-9a-f]{64}$/.test(name)) return false;
|
|
303
|
+
const st = lstat(libexec + '/' + name);
|
|
304
|
+
return st.isDirectory() && !st.isSymbolicLink() && st.uid === 0 && st.gid === 0 && (st.mode & 0o7777) === 0o700;
|
|
305
|
+
};
|
|
306
|
+
const libexecEntries = io.readdirSync(libexec).sort();
|
|
307
|
+
if (!requiredLibexecEntries.every(name => libexecEntries.includes(name)) ||
|
|
308
|
+
!libexecEntries.every(name => requiredLibexecEntries.includes(name) || managedSealedSnapshot(name))) fail();
|
|
300
309
|
check(helperRoot + '/libexec/nc-linux-peercred');
|
|
301
310
|
const bootstrap = JSON.parse(read(app + '/helper-bootstrap.json'));
|
|
302
311
|
const selection = JSON.parse(read('/var/lib/nc-lifecycle/selected.json'));
|
package/package.json
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-command",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Node Command CLI installer for the Node Command agent",
|
|
3
|
+
"version": "2.0.11",
|
|
5
4
|
"type": "module",
|
|
6
5
|
"license": "Apache-2.0",
|
|
7
6
|
"engines": {
|
|
8
7
|
"node": ">=24"
|
|
9
8
|
},
|
|
10
9
|
"bin": {
|
|
11
|
-
"nc": "bin/nc.mjs",
|
|
12
|
-
"
|
|
13
|
-
"nodecommand": "bin/nc.mjs",
|
|
14
|
-
"node-command": "bin/nc.mjs"
|
|
10
|
+
"nc": "./bin/nc.mjs",
|
|
11
|
+
"nodecommand": "./bin/nc.mjs"
|
|
15
12
|
},
|
|
16
13
|
"files": [
|
|
17
14
|
"bin/",
|
|
18
|
-
"lib/"
|
|
19
|
-
|
|
20
|
-
],
|
|
21
|
-
"publishConfig": {
|
|
22
|
-
"access": "public"
|
|
23
|
-
}
|
|
15
|
+
"lib/"
|
|
16
|
+
]
|
|
24
17
|
}
|