Merge pull request #5028 from Iceber/runtime-spec
oci: fix the file mode of the device
This commit is contained in:
commit
08d765af95
@ -108,7 +108,7 @@ func deviceFromPath(path, permissions string) (*specs.LinuxDevice, error) {
|
||||
case mode&unix.S_IFCHR == unix.S_IFCHR:
|
||||
devType = "c"
|
||||
}
|
||||
fm := os.FileMode(mode)
|
||||
fm := os.FileMode(mode &^ unix.S_IFMT)
|
||||
return &specs.LinuxDevice{
|
||||
Type: devType,
|
||||
Path: path,
|
||||
|
@ -107,7 +107,7 @@ func deviceFromPath(path, permissions string) (*specs.LinuxDevice, error) {
|
||||
case mode&unix.S_IFCHR == unix.S_IFCHR:
|
||||
devType = "c"
|
||||
}
|
||||
fm := os.FileMode(mode)
|
||||
fm := os.FileMode(mode &^ unix.S_IFMT)
|
||||
return &specs.LinuxDevice{
|
||||
Type: devType,
|
||||
Path: path,
|
||||
|
Loading…
Reference in New Issue
Block a user