@ai-ecoverse/slicc-kernel 1.196.11 → 1.196.12
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 +1 -1
- package/dist/async-process.js +1 -1
- package/dist/cloudflare-sources.js +1 -1
- package/dist/cloudflare.js +35 -24
- package/dist/cloudflare.js.map +2 -2
- package/dist/kernel-worker.js +35 -24
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.cjs +1 -1
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +35 -24
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +1 -1
- package/package.json +1 -1
|
@@ -9282,7 +9282,7 @@ var init_version = __esm({
|
|
|
9282
9282
|
"src/version.ts"() {
|
|
9283
9283
|
"use strict";
|
|
9284
9284
|
init_captured_globals();
|
|
9285
|
-
KERNEL_VERSION = true ? "1.196.
|
|
9285
|
+
KERNEL_VERSION = true ? "1.196.12" : "0.0.0-dev";
|
|
9286
9286
|
OS_RELEASE = "6.0.0-slicc";
|
|
9287
9287
|
}
|
|
9288
9288
|
});
|
|
@@ -9281,7 +9281,7 @@ var init_version = __esm({
|
|
|
9281
9281
|
"src/version.ts"() {
|
|
9282
9282
|
"use strict";
|
|
9283
9283
|
init_captured_globals();
|
|
9284
|
-
KERNEL_VERSION = true ? "1.196.
|
|
9284
|
+
KERNEL_VERSION = true ? "1.196.12" : "0.0.0-dev";
|
|
9285
9285
|
OS_RELEASE = "6.0.0-slicc";
|
|
9286
9286
|
}
|
|
9287
9287
|
});
|
package/dist/node.js
CHANGED
|
@@ -7731,7 +7731,7 @@ function satisfies(version, range2) {
|
|
|
7731
7731
|
}
|
|
7732
7732
|
|
|
7733
7733
|
// src/version.ts
|
|
7734
|
-
var KERNEL_VERSION = true ? "1.196.
|
|
7734
|
+
var KERNEL_VERSION = true ? "1.196.12" : "0.0.0-dev";
|
|
7735
7735
|
var OS_RELEASE = "6.0.0-slicc";
|
|
7736
7736
|
function procVersion() {
|
|
7737
7737
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -19241,9 +19241,11 @@ function splitWords(text) {
|
|
|
19241
19241
|
if (word !== void 0) words3.push(word);
|
|
19242
19242
|
return words3;
|
|
19243
19243
|
}
|
|
19244
|
+
function shellQuote(word) {
|
|
19245
|
+
return PLAIN.test(word) ? word : `'${word.replaceAll("'", `'\\''`)}'`;
|
|
19246
|
+
}
|
|
19244
19247
|
function quoteWord(word) {
|
|
19245
|
-
|
|
19246
|
-
return PLAIN.test(text) ? text : `'${text.replaceAll("'", `'\\''`)}'`;
|
|
19248
|
+
return shellQuote(hasControl2(word) ? withoutControl(word) : word);
|
|
19247
19249
|
}
|
|
19248
19250
|
function addPart(word, part) {
|
|
19249
19251
|
const last = word.length - 1;
|
|
@@ -19280,14 +19282,14 @@ function splitPatterns(text) {
|
|
|
19280
19282
|
}
|
|
19281
19283
|
var literal = (pattern) => pattern.map((p) => p ?? "*").join("");
|
|
19282
19284
|
var isAny = (pattern) => pattern?.length === 1 && pattern[0] === null;
|
|
19283
|
-
function literalWord(word) {
|
|
19284
|
-
if (!word.includes("*")) return
|
|
19285
|
+
function literalWord(word, quote) {
|
|
19286
|
+
if (!word.includes("*")) return quote(word);
|
|
19285
19287
|
const bare = word.replaceAll("*", "");
|
|
19286
|
-
return bare === "" || PLAIN.test(bare) ? word.replaceAll("*", "\\*") :
|
|
19288
|
+
return bare === "" || PLAIN.test(bare) ? word.replaceAll("*", "\\*") : quote(word);
|
|
19287
19289
|
}
|
|
19288
|
-
function patternWord(pattern) {
|
|
19289
|
-
if (pattern.length === 1 && typeof pattern[0] === "string") return literalWord(pattern[0]);
|
|
19290
|
-
return pattern.map((p) => p === null ? "*" : literalWord(p)).join("");
|
|
19290
|
+
function patternWord(pattern, quote) {
|
|
19291
|
+
if (pattern.length === 1 && typeof pattern[0] === "string") return literalWord(pattern[0], quote);
|
|
19292
|
+
return pattern.map((p) => p === null ? "*" : literalWord(p, quote)).join("");
|
|
19291
19293
|
}
|
|
19292
19294
|
function globMatch(items, subjects, star, one) {
|
|
19293
19295
|
let i = 0;
|
|
@@ -19333,11 +19335,14 @@ function commandMatches(cmnd, argv) {
|
|
|
19333
19335
|
(i, j) => wordMatch(want2[i], args[j])
|
|
19334
19336
|
);
|
|
19335
19337
|
}
|
|
19336
|
-
function
|
|
19337
|
-
const path =
|
|
19338
|
+
function formatCommand(cmnd, quote) {
|
|
19339
|
+
const path = quote(cmnd.path);
|
|
19338
19340
|
if (cmnd.args === void 0) return path;
|
|
19339
19341
|
if (cmnd.args.length === 0) return `${path} ""`;
|
|
19340
|
-
return [path, ...cmnd.args.map(patternWord)].join(" ");
|
|
19342
|
+
return [path, ...cmnd.args.map((arg) => patternWord(arg, quote))].join(" ");
|
|
19343
|
+
}
|
|
19344
|
+
function commandText(cmnd) {
|
|
19345
|
+
return formatCommand(cmnd, quoteWord);
|
|
19341
19346
|
}
|
|
19342
19347
|
function validWho(who) {
|
|
19343
19348
|
if (who === "ALL") return true;
|
|
@@ -19528,25 +19533,31 @@ function directiveError(text) {
|
|
|
19528
19533
|
}
|
|
19529
19534
|
return void 0;
|
|
19530
19535
|
}
|
|
19531
|
-
function
|
|
19532
|
-
|
|
19536
|
+
function legacyApproval(line, file, rule2) {
|
|
19537
|
+
const { cmnd } = rule2;
|
|
19538
|
+
if (cmnd === "*" || !rule2.nopasswd || rule2.sha256 !== void 0) return rule2;
|
|
19533
19539
|
if (file !== `${SUDOERS_D}/${rule2.who}` || !NAME3.test(rule2.who) || !NAME3.test(rule2.target)) {
|
|
19534
|
-
return
|
|
19540
|
+
return rule2;
|
|
19535
19541
|
}
|
|
19536
|
-
const
|
|
19537
|
-
const
|
|
19538
|
-
const cwd = rule2.cwd === void 0 ? "" : `Cwd ${quoteWord(rule2.cwd)} `;
|
|
19542
|
+
const quote = rule2.stdin === void 0 ? shellQuote : quoteWord;
|
|
19543
|
+
const cwd = rule2.cwd === void 0 ? "" : `Cwd ${quote(rule2.cwd)} `;
|
|
19539
19544
|
const stdin = rule2.stdin === void 0 ? "" : "Stdin none ";
|
|
19540
|
-
|
|
19545
|
+
const prefix = `NOPASSWD ${rule2.who} (${rule2.target}) ${cwd}${stdin}Cmnd `;
|
|
19546
|
+
if (!line.startsWith(prefix)) return rule2;
|
|
19547
|
+
const words3 = line.slice(prefix.length).trimEnd();
|
|
19548
|
+
if (cmnd.args === void 0) {
|
|
19549
|
+
if (words3 !== quote(cmnd.path)) return rule2;
|
|
19550
|
+
return { ...rule2, cmnd: { ...cmnd, args: [] }, ...stdin ? {} : { sha256: {} } };
|
|
19551
|
+
}
|
|
19552
|
+
if (cmnd.args.some((arg) => arg.includes(null))) return rule2;
|
|
19553
|
+
const current = rule2.cwd !== void 0 && words3 === formatCommand(cmnd, quote);
|
|
19554
|
+
const earliest = !stdin && words3 === [cmnd.path, ...cmnd.args.map(literal)].map(quote).join(" ");
|
|
19555
|
+
return current || earliest ? { ...rule2, sha256: {} } : rule2;
|
|
19541
19556
|
}
|
|
19542
19557
|
function kernelLine(m, line, file) {
|
|
19543
19558
|
const rules = kernelRules(m);
|
|
19544
19559
|
if (typeof rules === "string") return { error: rules };
|
|
19545
|
-
return {
|
|
19546
|
-
rules: rules.map(
|
|
19547
|
-
(rule2) => recordedBare(line, file, rule2) && rule2.cmnd !== "*" ? { ...rule2, cmnd: { path: rule2.cmnd.path, args: [] } } : rule2
|
|
19548
|
-
)
|
|
19549
|
-
};
|
|
19560
|
+
return { rules: rules.map((rule2) => legacyApproval(line, file, rule2)) };
|
|
19550
19561
|
}
|
|
19551
19562
|
var DEFAULTS = /^Defaults(?=[:@>!\s]|$)/;
|
|
19552
19563
|
var DEFAULTS_ONLY = `Defaults aren't supported, except timestamp_timeout, timestamp_type and env_keep for everyone, a user or a %group: this line changes nothing`;
|