Skip to content

Commit

Permalink
Merge pull request moby#18538 from estesp/aufs-whiteout-userns-fix
Browse files Browse the repository at this point in the history
Skip aufs whiteout files on userns translation to container
  • Loading branch information
cpuguy83 committed Dec 9, 2015
2 parents 7470e39 + 1626c9d commit 8b6132a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/archive/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,9 @@ func (ta *tarAppender) addTarFile(path, name string) error {
}

//handle re-mapping container ID mappings back to host ID mappings before
//writing tar headers/files
if ta.UIDMaps != nil || ta.GIDMaps != nil {
//writing tar headers/files. We skip whiteout files because they were written
//by the kernel and already have proper ownership relative to the host
if !strings.HasPrefix(filepath.Base(hdr.Name), WhiteoutPrefix) && (ta.UIDMaps != nil || ta.GIDMaps != nil) {
uid, gid, err := getFileUIDGID(fi.Sys())
if err != nil {
return err
Expand Down

0 comments on commit 8b6132a

Please sign in to comment.