@ai-ecoverse/slicc-kernel 1.53.0 → 1.53.1

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.
@@ -8061,8 +8061,11 @@ var init_procfs = __esm({
8061
8061
  });
8062
8062
 
8063
8063
  // src/process/realm-user.ts
8064
- function ownByCaller(Fs, cred) {
8065
- const owner = { uid: cred?.euid ?? 0, gid: cred?.egid ?? 0 };
8064
+ function credAbi(glue) {
8065
+ return CRED_ABI.test(glue);
8066
+ }
8067
+ function ownByCaller(Fs, cred, abi = true) {
8068
+ const owner = abi ? { uid: cred?.euid ?? 0, gid: cred?.egid ?? 0 } : { ...LEGACY_OWNER };
8066
8069
  const { stat, fstat } = Fs;
8067
8070
  const owned = (attr2) => ({ ...attr2, uid: owner.uid, gid: owner.gid });
8068
8071
  if (typeof stat === "function") {
@@ -8071,9 +8074,12 @@ function ownByCaller(Fs, cred) {
8071
8074
  if (typeof fstat === "function") Fs.fstat = (fd) => owned(fstat.call(Fs, fd));
8072
8075
  return owner;
8073
8076
  }
8077
+ var LEGACY_OWNER, CRED_ABI;
8074
8078
  var init_realm_user = __esm({
8075
8079
  "src/process/realm-user.ts"() {
8076
8080
  "use strict";
8081
+ LEGACY_OWNER = Object.freeze({ uid: 1e3, gid: 1e3 });
8082
+ CRED_ABI = /\bslicc_cred_js\b/;
8077
8083
  }
8078
8084
  });
8079
8085
 
@@ -8442,7 +8448,7 @@ async function runWasmProcess(init, port3, deps = {}) {
8442
8448
  describeFork: () => describeForFork(running.FS, sys, streams, livePath),
8443
8449
  inherit: (actions) => describeInherited(running.FS, sys, streams, livePath, actions),
8444
8450
  stdioPromoter: () => vfsPromoter(running.FS, sys, streams, livePath),
8445
- owner: ownByCaller(running.FS, init.cred)
8451
+ owner: ownByCaller(running.FS, init.cred, credAbi(init.program.glue))
8446
8452
  });
8447
8453
  running.sliccKernel.http = createHttpKernel(transport);
8448
8454
  running.sliccKernel.hostname = hostnameOf(init.env);