Skip to content

Commit

Permalink
Merge pull request opencontainers#956 from kinvolk/alban/uid-mapping
Browse files Browse the repository at this point in the history
uidMappings: change order of fields for clarity
  • Loading branch information
Mrunal Patel authored Mar 9, 2018
2 parents fa4b36a + cd39042 commit 6be516e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ If a `namespaces` field contains duplicated namespaces with same `type`, the run

Each entry has the following structure:

* **`hostID`** *(uint32, REQUIRED)* - is the starting uid/gid on the host to be mapped to *containerID*.
* **`containerID`** *(uint32, REQUIRED)* - is the starting uid/gid in the container.
* **`hostID`** *(uint32, REQUIRED)* - is the starting uid/gid on the host to be mapped to *containerID*.
* **`size`** *(uint32, REQUIRED)* - is the number of ids to be mapped.

The runtime SHOULD NOT modify the ownership of referenced filesystems to realize the mapping.
Expand All @@ -94,15 +94,15 @@ Note that the number of mapping entries MAY be limited by the [kernel][user-name
```json
"uidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
"gidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
]
Expand Down
4 changes: 2 additions & 2 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,15 +664,15 @@ Here is a full example `config.json` for reference.
],
"uidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
"gidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
Expand Down
6 changes: 3 additions & 3 deletions schema/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@
"IDMapping": {
"type": "object",
"properties": {
"hostID": {
"containerID": {
"$ref": "#/definitions/uint32"
},
"containerID": {
"hostID": {
"$ref": "#/definitions/uint32"
},
"size": {
"$ref": "#/definitions/uint32"
}
},
"required": [
"hostID",
"containerID",
"hostID",
"size"
]
},
Expand Down
4 changes: 2 additions & 2 deletions schema/test/config/good/spec-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@
],
"uidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
"gidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
Expand Down
4 changes: 2 additions & 2 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ const (

// LinuxIDMapping specifies UID/GID mappings
type LinuxIDMapping struct {
// HostID is the starting UID/GID on the host to be mapped to 'ContainerID'
HostID uint32 `json:"hostID"`
// ContainerID is the starting UID/GID in the container
ContainerID uint32 `json:"containerID"`
// HostID is the starting UID/GID on the host to be mapped to 'ContainerID'
HostID uint32 `json:"hostID"`
// Size is the number of IDs to be mapped
Size uint32 `json:"size"`
}
Expand Down

0 comments on commit 6be516e

Please sign in to comment.