Vendor in latest containers/storage and containers/image

Containers/storage brings in support for UserNS ID Mappings
This means we can start experimenting with User NS Support in
podman

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #596
Approved by: TomSweeneyRedHat
This commit is contained in:
Daniel J Walsh
2018-04-05 15:34:31 -04:00
committed by Atomic Bot
parent fbc9d189b1
commit c3e2b00333
31 changed files with 3742 additions and 184 deletions

View File

@ -43,7 +43,7 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap
continue
}
}
return graphdriver.NewNaiveDiffDriver(d, uidMaps, gidMaps), nil
return graphdriver.NewNaiveDiffDriver(d, graphdriver.NewNaiveLayerIDMapUpdater(d)), nil
}
// Driver holds information about the driver, home directory of the driver.
@ -91,6 +91,14 @@ func (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) error {
if err := idtools.MkdirAllAndChown(filepath.Dir(dir), 0700, rootIDs); err != nil {
return err
}
if parent != "" {
st, err := system.Stat(d.dir(parent))
if err != nil {
return err
}
rootIDs.UID = int(st.UID())
rootIDs.GID = int(st.GID())
}
if err := idtools.MkdirAndChown(dir, 0755, rootIDs); err != nil {
return err
}