mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
daemon: rename variables that collide with imported package names
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -82,12 +82,12 @@ func (daemon *Daemon) setupMounts(c *container.Container) ([]container.Mount, er
|
||||
// metadata, the ownership must be set properly for potential container
|
||||
// remapped root (user namespaces)
|
||||
rootIDs := daemon.idMapping.RootPair()
|
||||
for _, mount := range netMounts {
|
||||
for _, mnt := range netMounts {
|
||||
// we should only modify ownership of network files within our own container
|
||||
// metadata repository. If the user specifies a mount path external, it is
|
||||
// up to the user to make sure the file has proper ownership for userns
|
||||
if strings.Index(mount.Source, daemon.repository) == 0 {
|
||||
if err := os.Chown(mount.Source, rootIDs.UID, rootIDs.GID); err != nil {
|
||||
if strings.Index(mnt.Source, daemon.repository) == 0 {
|
||||
if err := os.Chown(mnt.Source, rootIDs.UID, rootIDs.GID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user