summaryrefslogtreecommitdiff
path: root/pkg/spec/spec.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-07-18 11:38:54 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-07-18 17:07:50 +0200
commit350ede1eeb6ab33bce2918d7768b940c255e63c6 (patch)
treeba65d688c51ce2374e349bf874751404e13e0309 /pkg/spec/spec.go
parent7488ed6d9a619d86333dc1880d4df034fbb371b9 (diff)
downloadpodman-350ede1eeb6ab33bce2918d7768b940c255e63c6.tar.gz
podman-350ede1eeb6ab33bce2918d7768b940c255e63c6.tar.bz2
podman-350ede1eeb6ab33bce2918d7768b940c255e63c6.zip
rootless: add rw devices with --privileged
when --privileged is specified, add all the devices that are usable by the user. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1730773 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/spec/spec.go')
-rw-r--r--pkg/spec/spec.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index 41054633f..0f785df01 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -264,10 +264,8 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM
// If privileged, we need to add all the host devices to the
// spec. We do not add the user provided ones because we are
// already adding them all.
- if !rootless.IsRootless() {
- if err := config.AddPrivilegedDevices(&g); err != nil {
- return nil, err
- }
+ if err := config.AddPrivilegedDevices(&g); err != nil {
+ return nil, err
}
} else {
for _, devicePath := range config.Devices {