@ai-ecoverse/slicc-kernel 1.195.0 → 1.195.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.
@@ -8166,7 +8166,7 @@ var init_version = __esm({
8166
8166
  "src/version.ts"() {
8167
8167
  "use strict";
8168
8168
  init_captured_globals();
8169
- KERNEL_VERSION = true ? "1.195.0" : "0.0.0-dev";
8169
+ KERNEL_VERSION = true ? "1.195.1" : "0.0.0-dev";
8170
8170
  OS_RELEASE = "6.0.0-slicc";
8171
8171
  }
8172
8172
  });
@@ -8165,7 +8165,7 @@ var init_version = __esm({
8165
8165
  "src/version.ts"() {
8166
8166
  "use strict";
8167
8167
  init_captured_globals();
8168
- KERNEL_VERSION = true ? "1.195.0" : "0.0.0-dev";
8168
+ KERNEL_VERSION = true ? "1.195.1" : "0.0.0-dev";
8169
8169
  OS_RELEASE = "6.0.0-slicc";
8170
8170
  }
8171
8171
  });
package/dist/node.js CHANGED
@@ -7512,7 +7512,7 @@ function satisfies(version, range2) {
7512
7512
  }
7513
7513
 
7514
7514
  // src/version.ts
7515
- var KERNEL_VERSION = true ? "1.195.0" : "0.0.0-dev";
7515
+ var KERNEL_VERSION = true ? "1.195.1" : "0.0.0-dev";
7516
7516
  var OS_RELEASE = "6.0.0-slicc";
7517
7517
  function procVersion() {
7518
7518
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -19709,6 +19709,7 @@ var Sudo = class {
19709
19709
  for (const file of new Set(files)) {
19710
19710
  if (await this.trusted(file)) continue;
19711
19711
  const real = await this.real(file);
19712
+ if (Object.hasOwn(found, real)) continue;
19712
19713
  found[real] = await fs.readFileBuffer(real).then(sha2562, () => "");
19713
19714
  }
19714
19715
  return found;
@@ -37175,7 +37176,7 @@ var Launcher = class {
37175
37176
  const ids = { pid: req.exec ? caller : pid, ppid: caller };
37176
37177
  const stamp = await this.sealed.stamp(ids, cred, this.tagsOf(ppid));
37177
37178
  const interpreters = await this.interpreterChain(planned, booked.cwd, scope);
37178
- const trusted = this.usersMode === "enforce" && await this.trustedFiles(planned, req.file, booked.cwd, scope);
37179
+ const trusted = this.usersMode === "enforce" && await this.trustedFiles(planned, req.file, booked.cwd);
37179
37180
  const swap = await this.sealed.consume({
37180
37181
  ticket,
37181
37182
  stamp,
@@ -37196,7 +37197,7 @@ var Launcher = class {
37196
37197
  }
37197
37198
  const scrub = scrubberOf(secrets);
37198
37199
  const recheck = async (next3) => {
37199
- const same2 = sameList(planFiles(next3), planFiles(planned)) && sameList(await this.interpreterChain(next3, booked.cwd, scope), interpreters) && (this.usersMode === "enforce" && await this.trustedFiles(next3, req.file, booked.cwd, scope)) === trusted;
37200
+ const same2 = sameList(planFiles(next3), planFiles(planned)) && sameList(await this.interpreterChain(next3, booked.cwd, scope), interpreters) && (this.usersMode === "enforce" && await this.trustedFiles(next3, req.file, booked.cwd)) === trusted;
37200
37201
  if (!same2) throw new SpawnError("EACCES");
37201
37202
  };
37202
37203
  return { env, pid, cwd: booked.cwd, ...scrub ? { scrub } : {}, recheck };
@@ -37221,8 +37222,8 @@ var Launcher = class {
37221
37222
  if (!scoped || system?.glue === scoped.glue) return `/usr/bin/${name2}`;
37222
37223
  return scoped.glue;
37223
37224
  }
37224
- async trustedFiles(planned, file, cwd, scope) {
37225
- const files = await this.backingOf(planned, file, cwd, scope);
37225
+ async trustedFiles(planned, file, cwd) {
37226
+ const files = await this.backingOf(planned, file, cwd);
37226
37227
  for (const at of files) {
37227
37228
  if (!await rootOnly(this.base, await physicalPathAsync(this.base, at))) return false;
37228
37229
  }
@@ -37231,7 +37232,7 @@ var Launcher = class {
37231
37232
  async unchanged(planned, file, cwd, grant) {
37232
37233
  const approved = grant?.files;
37233
37234
  if (!approved) return {};
37234
- const files = await this.backingOf(planned, file, cwd, "");
37235
+ const files = await this.backingOf(planned, file, cwd);
37235
37236
  refuseChanged(approved, await this.sudoer.digests([file, ...files]));
37236
37237
  return { pinned: approved };
37237
37238
  }
@@ -37264,18 +37265,18 @@ var Launcher = class {
37264
37265
  async backing(asked, cwd) {
37265
37266
  const file = await this.execFile(asked, cwd);
37266
37267
  const { planned } = await this.plan(file, [file], cwd, "");
37267
- return planned && this.backingOf(planned, file, cwd, "");
37268
+ return planned && this.backingOf(planned, file, cwd);
37268
37269
  }
37269
- async backingOf(planned, file, cwd, scope) {
37270
- const { glue, wasm, imports } = planned.target;
37270
+ async backingOf(planned, file, cwd) {
37271
+ const { glue, wasm, imports, copy } = planned.target;
37271
37272
  const files = [glue, wasm, ...imports ? [imports] : []];
37272
- const scripts = [];
37273
- for (const name2 of [file, ...planned.via ?? []]) {
37274
- if (name2.includes("/") && !COMMAND2.test(name2)) scripts.push(this.fs.resolvePath(cwd, name2));
37275
- const script = (await this.scriptCommand(name2, cwd, scope))?.script;
37276
- if (script) scripts.push(script);
37273
+ const sources = planned.sources ?? [];
37274
+ for (const [i, name2] of [file, ...planned.via ?? []].entries()) {
37275
+ if (name2.includes("/") && !COMMAND2.test(name2)) files.push(this.fs.resolvePath(cwd, name2));
37276
+ const source = sources[i];
37277
+ if (source !== void 0) files.push(source);
37277
37278
  }
37278
- files.push(...scripts, ...planned.binfmts ?? []);
37279
+ files.push(...copy ? [copy] : [], ...planned.binfmts ?? []);
37279
37280
  const roots = await this.roots();
37280
37281
  for (const at of [...files]) {
37281
37282
  const root = packageRootOf(at, roots) ?? PACKAGE_ROOT.exec(at)?.[1];