@lakutata/containerd 3.0.0-beta.0 → 3.0.0-beta.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.
|
@@ -70,7 +70,7 @@ async function readRootfsFile(mounts, file, depth = 0) {
|
|
|
70
70
|
* The entries of a file of the database of the users or of the groups (name:x:id:…)
|
|
71
71
|
* @param content
|
|
72
72
|
*/
|
|
73
|
-
function
|
|
73
|
+
function parseEntries(content) {
|
|
74
74
|
if (!content)
|
|
75
75
|
return [];
|
|
76
76
|
return content.toString('utf8').split('\n').filter((line) => !!line.trim() && !line.startsWith('#')).map((line) => line.split(':'));
|
|
@@ -82,7 +82,7 @@ function readEntries(content) {
|
|
|
82
82
|
*/
|
|
83
83
|
async function resolveUser(mounts, user) {
|
|
84
84
|
const [userPart, groupPart] = (user ?? '').split(':');
|
|
85
|
-
const passwd =
|
|
85
|
+
const passwd = parseEntries(await readRootfsFile(mounts, '/etc/passwd'));
|
|
86
86
|
let uid = 0;
|
|
87
87
|
let gid = 0;
|
|
88
88
|
let home = '/';
|
|
@@ -109,7 +109,7 @@ async function resolveUser(mounts, user) {
|
|
|
109
109
|
if (root)
|
|
110
110
|
home = root[5] || '/';
|
|
111
111
|
}
|
|
112
|
-
const groups =
|
|
112
|
+
const groups = parseEntries(await readRootfsFile(mounts, '/etc/group'));
|
|
113
113
|
if (groupPart) {
|
|
114
114
|
const entry = groups.find((fields) => fields[0] === groupPart);
|
|
115
115
|
if (entry)
|
|
@@ -61,7 +61,7 @@ export async function readRootfsFile(mounts, file, depth = 0) {
|
|
|
61
61
|
* The entries of a file of the database of the users or of the groups (name:x:id:…)
|
|
62
62
|
* @param content
|
|
63
63
|
*/
|
|
64
|
-
function
|
|
64
|
+
function parseEntries(content) {
|
|
65
65
|
if (!content)
|
|
66
66
|
return [];
|
|
67
67
|
return content.toString('utf8').split('\n').filter((line) => !!line.trim() && !line.startsWith('#')).map((line) => line.split(':'));
|
|
@@ -73,7 +73,7 @@ function readEntries(content) {
|
|
|
73
73
|
*/
|
|
74
74
|
export async function resolveUser(mounts, user) {
|
|
75
75
|
const [userPart, groupPart] = (user ?? '').split(':');
|
|
76
|
-
const passwd =
|
|
76
|
+
const passwd = parseEntries(await readRootfsFile(mounts, '/etc/passwd'));
|
|
77
77
|
let uid = 0;
|
|
78
78
|
let gid = 0;
|
|
79
79
|
let home = '/';
|
|
@@ -100,7 +100,7 @@ export async function resolveUser(mounts, user) {
|
|
|
100
100
|
if (root)
|
|
101
101
|
home = root[5] || '/';
|
|
102
102
|
}
|
|
103
|
-
const groups =
|
|
103
|
+
const groups = parseEntries(await readRootfsFile(mounts, '/etc/group'));
|
|
104
104
|
if (groupPart) {
|
|
105
105
|
const entry = groups.find((fields) => fields[0] === groupPart);
|
|
106
106
|
if (entry)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lakutata/containerd",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
4
4
|
"description": "The containerd component of the lakutata framework: images (pull, push, import, export, of any platform), containers and their processes, over the API of containerd, for the systems which run containerd without Docker.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/exports/Containerd.js",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"test:engines": "sh test-env/run.sh"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@lakutata/grpc": "3.0.0-beta.
|
|
34
|
+
"@lakutata/grpc": "3.0.0-beta.1",
|
|
35
35
|
"tar-stream": "3.2.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@lakutata/core": "3.0.0-beta.
|
|
39
|
-
"@lakutata/logger": "3.0.0-beta.
|
|
40
|
-
"@lakutata/utils": "3.0.0-beta.
|
|
38
|
+
"@lakutata/core": "3.0.0-beta.1",
|
|
39
|
+
"@lakutata/logger": "3.0.0-beta.1",
|
|
40
|
+
"@lakutata/utils": "3.0.0-beta.1"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=22"
|