mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Merge pull request #2186 from giuseppe/rootless-fix-pid-host
rootless: fix --pid=host without --privileged
This commit is contained in:
@ -376,6 +376,10 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
|
||||
}
|
||||
|
||||
func blockAccessToKernelFilesystems(config *CreateConfig, g *generate.Generator) {
|
||||
if config.PidMode.IsHost() && rootless.IsRootless() {
|
||||
return
|
||||
}
|
||||
|
||||
if !config.Privileged {
|
||||
for _, mp := range []string{
|
||||
"/proc/acpi",
|
||||
|
@ -276,6 +276,10 @@ var _ = Describe("Podman rootless", func() {
|
||||
runRootlessHelper([]string{"--net", "host"})
|
||||
})
|
||||
|
||||
It("podman rootless rootfs --pid host", func() {
|
||||
runRootlessHelper([]string{"--pid", "host"})
|
||||
})
|
||||
|
||||
It("podman rootless rootfs --privileged", func() {
|
||||
runRootlessHelper([]string{"--privileged"})
|
||||
})
|
||||
|
Reference in New Issue
Block a user