code: func ExtractTarInsecure(tr *tar.Reader, target string, overwrite bool, pwl PathWhitelistMap, editor FilePermissionsEditor) error {
  	um := syscall.Umask(0)
  	defer syscall.Umask(um)
  
  	var dirhdrs []*tar.Header
  Tar:
  	for {
  		hdr, err := tr.Next()
  		switch err {
  		case io.EOF:
  			break Tar
  		case nil:
  			if pwl != nil {
  				relpath := filepath.Clean(hdr.Name)
  				if _, ok := pwl[relpath]; !ok {
  					continue
  				}
  			}
  			err = extractFile(tr, target, hdr, overwrite, editor)
  			if err != nil {
  				return fmt.Errorf("could not extract file %q in %q: %v", hdr.Name, target, err)
  			}
  			if hdr.Typeflag == tar.TypeDir {
  				dirhdrs = append(dirhdrs, hdr)
  			}
  		default:
  			return err
  		}
  	}
  
  	// Restore dirs atime and mtime. This has to be done after extracting
  	// as a file extraction will change its parent directory's times.
  	for _, hdr := range dirhdrs {
  		p := filepath.Join(target, hdr.Name)
  		if err := syscall.UtimesNano(p, HdrToTimespec(hdr)); err != nil {
  			return fmt.Errorf("UtimesNano failed on %q: %v", p, err)
  		}
  	}
  	return nil
  }
docs: // ExtractTarInsecure extracts a tarball (from a tar.Reader) into the target
  // directory. If pwl is not nil, only the paths in the map are extracted. If
  // overwrite is true, existing files will be overwritten.