Skip to content

Commit

Permalink
Merge pull request opencontainers#647 from Mashimiao/config-linux-fix…
Browse files Browse the repository at this point in the history
…-device-path

config-linux: Add restriction for duplicated device path
  • Loading branch information
Mrunal Patel authored Jan 12, 2017
2 parents aad1f38 + 1fc1464 commit c0206be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,15 @@ Each entry has the following structure:
* **`type`** *(string, REQUIRED)* - type of device: `c`, `b`, `u` or `p`.
More info in [mknod(1)][mknod.1].
* **`path`** *(string, REQUIRED)* - full path to device inside container.
If a [file][file.1] already exists at `path` that does not match the requested device, the runtime MUST generate an error.
* **`major, minor`** *(int64, REQUIRED unless **`type`** is `p`)* - [major, minor numbers][devices] for the device.
* **`fileMode`** *(uint32, OPTIONAL)* - file mode for the device.
You can also control access to devices [with cgroups](#device-whitelist).
* **`uid`** *(uint32, OPTIONAL)* - id of device owner.
* **`gid`** *(uint32, OPTIONAL)* - id of device group.

The same `type`, `major` and `minor` SHOULD NOT be used for multiple devices.

###### Example

```json
Expand Down Expand Up @@ -607,6 +610,7 @@ The values MUST be absolute paths in the [container namespace][container-namespa
[cgroup-v2]: https://www.kernel.org/doc/Documentation/cgroup-v2.txt
[devices]: https://www.kernel.org/doc/Documentation/devices.txt
[devpts]: https://www.kernel.org/doc/Documentation/filesystems/devpts.txt
[file.1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_164

[mknod.1]: http://man7.org/linux/man-pages/man1/mknod.1.html
[mknod.2]: http://man7.org/linux/man-pages/man2/mknod.2.html
Expand Down

0 comments on commit c0206be

Please sign in to comment.