@ai-ecoverse/slicc-kernel 1.53.0 → 1.53.2
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/README.md +2 -2
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +9 -5
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +19 -3
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +9 -5
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +9 -3
- package/dist/process-worker.js.map +2 -2
- package/package.json +2 -1
package/dist/process-worker.js
CHANGED
|
@@ -3813,8 +3813,11 @@ var init_procfs = __esm({
|
|
|
3813
3813
|
});
|
|
3814
3814
|
|
|
3815
3815
|
// src/process/realm-user.ts
|
|
3816
|
-
function
|
|
3817
|
-
|
|
3816
|
+
function credAbi(glue) {
|
|
3817
|
+
return CRED_ABI.test(glue);
|
|
3818
|
+
}
|
|
3819
|
+
function ownByCaller(Fs, cred, abi = true) {
|
|
3820
|
+
const owner = abi ? { uid: cred?.euid ?? 0, gid: cred?.egid ?? 0 } : { ...LEGACY_OWNER };
|
|
3818
3821
|
const { stat, fstat } = Fs;
|
|
3819
3822
|
const owned = (attr2) => ({ ...attr2, uid: owner.uid, gid: owner.gid });
|
|
3820
3823
|
if (typeof stat === "function") {
|
|
@@ -3823,9 +3826,12 @@ function ownByCaller(Fs, cred) {
|
|
|
3823
3826
|
if (typeof fstat === "function") Fs.fstat = (fd) => owned(fstat.call(Fs, fd));
|
|
3824
3827
|
return owner;
|
|
3825
3828
|
}
|
|
3829
|
+
var LEGACY_OWNER, CRED_ABI;
|
|
3826
3830
|
var init_realm_user = __esm({
|
|
3827
3831
|
"src/process/realm-user.ts"() {
|
|
3828
3832
|
"use strict";
|
|
3833
|
+
LEGACY_OWNER = Object.freeze({ uid: 1e3, gid: 1e3 });
|
|
3834
|
+
CRED_ABI = /\bslicc_cred_js\b/;
|
|
3829
3835
|
}
|
|
3830
3836
|
});
|
|
3831
3837
|
|
|
@@ -4194,7 +4200,7 @@ async function runWasmProcess(init, port2, deps = {}) {
|
|
|
4194
4200
|
describeFork: () => describeForFork(running.FS, sys, streams, livePath),
|
|
4195
4201
|
inherit: (actions) => describeInherited(running.FS, sys, streams, livePath, actions),
|
|
4196
4202
|
stdioPromoter: () => vfsPromoter(running.FS, sys, streams, livePath),
|
|
4197
|
-
owner: ownByCaller(running.FS, init.cred)
|
|
4203
|
+
owner: ownByCaller(running.FS, init.cred, credAbi(init.program.glue))
|
|
4198
4204
|
});
|
|
4199
4205
|
running.sliccKernel.http = createHttpKernel(transport);
|
|
4200
4206
|
running.sliccKernel.hostname = hostnameOf(init.env);
|