mirror of
https://github.com/containers/podman.git
synced 2025-06-25 12:20:42 +08:00
Merge pull request #13031 from giuseppe/drop-permission-check-privileged-rootless-devices
rootless: drop permission check for devices
This commit is contained in:
@ -47,17 +47,6 @@ func addPrivilegedDevices(g *generate.Generator) error {
|
||||
if _, found := mounts[d.Path]; found {
|
||||
continue
|
||||
}
|
||||
st, err := os.Stat(d.Path)
|
||||
if err != nil {
|
||||
if err == unix.EPERM {
|
||||
continue
|
||||
}
|
||||
return err
|
||||
}
|
||||
// Skip devices that the user has not access to.
|
||||
if st.Mode()&0007 == 0 {
|
||||
continue
|
||||
}
|
||||
newMounts = append(newMounts, devMnt)
|
||||
}
|
||||
g.Config.Mounts = append(newMounts, g.Config.Mounts...)
|
||||
|
Reference in New Issue
Block a user