Skip to content

Commit dc16388

Browse files
author
Ma Shimiao
committed
config-linux: Add restriction for duplicated device path
I think runtime should generate an error, if devices has duplicated device path. Because we don't know which one is really needed. Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
1 parent ced3365 commit dc16388

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

config-linux.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ Each entry has the following structure:
115115
* **`type`** *(string, REQUIRED)* - type of device: `c`, `b`, `u` or `p`.
116116
More info in [mknod(1)][mknod.1].
117117
* **`path`** *(string, REQUIRED)* - full path to device inside container.
118+
If a file already exists at `path` that does not match the requested device, the runtime MUST generate an error.
118119
* **`major, minor`** *(int64, REQUIRED unless **`type`** is `p`)* - [major, minor numbers][devices] for the device.
120+
Same `major, minor` for different devices is acceptable, but it is not recommended.
119121
* **`fileMode`** *(uint32, OPTIONAL)* - file mode for the device.
120122
You can also control access to devices [with cgroups](#device-whitelist).
121123
* **`uid`** *(uint32, OPTIONAL)* - id of device owner.

0 commit comments

Comments
 (0)