Skip to content

Commit c0206be

Browse files
author
Mrunal Patel
authored
Merge pull request #647 from Mashimiao/config-linux-fix-device-path
config-linux: Add restriction for duplicated device path
2 parents aad1f38 + 1fc1464 commit c0206be

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config-linux.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,15 @@ Each entry has the following structure:
114114
* **`type`** *(string, REQUIRED)* - type of device: `c`, `b`, `u` or `p`.
115115
More info in [mknod(1)][mknod.1].
116116
* **`path`** *(string, REQUIRED)* - full path to device inside container.
117+
If a [file][file.1] already exists at `path` that does not match the requested device, the runtime MUST generate an error.
117118
* **`major, minor`** *(int64, REQUIRED unless **`type`** is `p`)* - [major, minor numbers][devices] for the device.
118119
* **`fileMode`** *(uint32, OPTIONAL)* - file mode for the device.
119120
You can also control access to devices [with cgroups](#device-whitelist).
120121
* **`uid`** *(uint32, OPTIONAL)* - id of device owner.
121122
* **`gid`** *(uint32, OPTIONAL)* - id of device group.
122123

124+
The same `type`, `major` and `minor` SHOULD NOT be used for multiple devices.
125+
123126
###### Example
124127

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

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

0 commit comments

Comments
 (0)