Merge pull request #5028 from Iceber/runtime-spec

oci: fix the file mode of the device
This commit is contained in:
Phil Estes
2021-02-22 09:25:56 -05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -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,

View File

@@ -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,