Skip to content

Commit 7050f8b

Browse files
committed
change the user of the Process to a reference
The type of `user` becomes `string` instead of platform aware structure, so the Spec becomes a platform-independent structure. It makes we can parse the config.json as a Spec before knowing the os, and allows we move the linux related *.go to linux/. Signed-off-by: Lai Jiangshan <[email protected]>
1 parent 138deee commit 7050f8b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ type Spec struct {
2121
type Process struct {
2222
// Terminal creates an interactive terminal for the container.
2323
Terminal bool `json:"terminal"`
24-
// User specifies user information for the process.
25-
User User `json:"user"`
24+
// User is a unique descriptive identifier which refers to the User in the runtime.json which specifies user information for the process.
25+
User string `json:"user"`
2626
// Args specifies the binary and arguments for the application to execute.
2727
Args []string `json:"args"`
2828
// Env populates the process environment for the process.

config_linux.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ type Linux struct {
1515
Capabilities []string `json:"capabilities"`
1616
// RootfsPropagation is the rootfs mount propagation mode for the container.
1717
RootfsPropagation string `json:"rootfsPropagation"`
18+
// Users is the search table for the User for the Process
19+
Users []User `json:"users"`
1820
}
1921

2022
// User specifies linux specific user and group information for the container's
21-
// main process.
23+
// main process or the other later entry processes.
2224
type User struct {
25+
// Name is identifier referenced from the Process
26+
Name string `json:"name"`
2327
// UID is the user id.
2428
UID int32 `json:"uid"`
2529
// GID is the group id.

0 commit comments

Comments
 (0)