mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Remove error return from RootPair
There is no case which would resolve in this error. The root user always exists, and if the id maps are empty, the default value of 0 is correct. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
@@ -54,8 +54,7 @@ func (daemon *Daemon) setupMounts(c *container.Container) ([]container.Mount, er
|
||||
return nil
|
||||
}
|
||||
|
||||
rootIDs, _ := daemon.idMappings.RootPair()
|
||||
path, err := m.Setup(c.MountLabel, rootIDs, checkfunc)
|
||||
path, err := m.Setup(c.MountLabel, daemon.idMappings.RootPair(), checkfunc)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -85,7 +84,7 @@ func (daemon *Daemon) setupMounts(c *container.Container) ([]container.Mount, er
|
||||
// if we are going to mount any of the network files from container
|
||||
// metadata, the ownership must be set properly for potential container
|
||||
// remapped root (user namespaces)
|
||||
rootIDs, _ := daemon.idMappings.RootPair()
|
||||
rootIDs := daemon.idMappings.RootPair()
|
||||
for _, mount := range netMounts {
|
||||
if err := os.Chown(mount.Source, rootIDs.UID, rootIDs.GID); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user