mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
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:

committed by
Atomic Bot

parent
fbc9d189b1
commit
c3e2b00333
10
vendor/github.com/containers/storage/drivers/vfs/driver.go
generated
vendored
10
vendor/github.com/containers/storage/drivers/vfs/driver.go
generated
vendored
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user