mirror of
https://github.com/containers/podman.git
synced 2025-06-26 04:46:57 +08:00
Merge pull request #15323 from rhatdan/warn
Don't warn on '/' not being shared while in a container
This commit is contained in:
@ -251,6 +251,7 @@ func becomeRootInUserNS(pausePid, fileToRead string, fileOutput *os.File) (_ boo
|
|||||||
return false, 0, nil
|
return false, 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _, inContainer := os.LookupEnv("container"); !inContainer {
|
||||||
if mounts, err := pmount.GetMounts(); err == nil {
|
if mounts, err := pmount.GetMounts(); err == nil {
|
||||||
for _, m := range mounts {
|
for _, m := range mounts {
|
||||||
if m.Mountpoint == "/" {
|
if m.Mountpoint == "/" {
|
||||||
@ -268,6 +269,7 @@ func becomeRootInUserNS(pausePid, fileToRead string, fileOutput *os.File) (_ boo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cPausePid := C.CString(pausePid)
|
cPausePid := C.CString(pausePid)
|
||||||
defer C.free(unsafe.Pointer(cPausePid))
|
defer C.free(unsafe.Pointer(cPausePid))
|
||||||
|
Reference in New Issue
Block a user