mirror of
https://github.com/containers/podman.git
synced 2025-06-27 05:26:50 +08:00
Merge pull request #2613 from rhatdan/selinux
Fix SELinux on host shared systems in userns
This commit is contained in:
@ -454,10 +454,6 @@ func findMount(target string, mounts []*pmount.Info) (*pmount.Info, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func blockAccessToKernelFilesystems(config *CreateConfig, g *generate.Generator) {
|
func blockAccessToKernelFilesystems(config *CreateConfig, g *generate.Generator) {
|
||||||
if config.PidMode.IsHost() && rootless.IsRootless() {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if !config.Privileged {
|
if !config.Privileged {
|
||||||
for _, mp := range []string{
|
for _, mp := range []string{
|
||||||
"/proc/acpi",
|
"/proc/acpi",
|
||||||
@ -469,10 +465,15 @@ func blockAccessToKernelFilesystems(config *CreateConfig, g *generate.Generator)
|
|||||||
"/proc/sched_debug",
|
"/proc/sched_debug",
|
||||||
"/proc/scsi",
|
"/proc/scsi",
|
||||||
"/sys/firmware",
|
"/sys/firmware",
|
||||||
|
"/sys/fs/selinux",
|
||||||
} {
|
} {
|
||||||
g.AddLinuxMaskedPaths(mp)
|
g.AddLinuxMaskedPaths(mp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.PidMode.IsHost() && rootless.IsRootless() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
for _, rp := range []string{
|
for _, rp := range []string{
|
||||||
"/proc/asound",
|
"/proc/asound",
|
||||||
"/proc/bus",
|
"/proc/bus",
|
||||||
|
Reference in New Issue
Block a user