mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-04 15:12:56 +08:00
main: add condition to isRootless()
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
@@ -234,7 +234,7 @@ func isRootless(context *cli.Context) (bool, error) {
|
|||||||
// So we use system.GetParentNSeuid() here.
|
// So we use system.GetParentNSeuid() here.
|
||||||
//
|
//
|
||||||
// TODO(AkihiroSuda): how to support nested userns?
|
// TODO(AkihiroSuda): how to support nested userns?
|
||||||
return system.GetParentNSeuid() != 0, nil
|
return system.GetParentNSeuid() != 0 || system.RunningInUserNS(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func createContainer(context *cli.Context, id string, spec *specs.Spec) (libcontainer.Container, error) {
|
func createContainer(context *cli.Context, id string, spec *specs.Spec) (libcontainer.Container, error) {
|
||||||
|
Reference in New Issue
Block a user