Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PUP-1186) Ignore PAX header in tar unpacking #2872

Merged

Conversation

highb
Copy link

@highb highb commented Jul 15, 2014

Prior to this commit if you installed a puppet module built on a platform with
a tar implementation that adds PAX headers and your platform didn't have a native
tar implementation (Windows), the module would contain junk PaxHeader directories.

This is due to the default POSIX behavior programmed in to minitar (the ruby tar
implementation used for platforms with out native tar) for an unknown typeflag,
such as those used in PAX headers, is to treat it as a regular file and extract it.

This commit adds a pre-scan step to our use of minitar for unpacking that finds
all the files with standard typeflags (0-7) and then only unpacks those, thus ignoring
any Pax typeflags like 'x' or 'g'.

Prior to this commit if you installed a puppet module built on a platform with
a tar implementation that adds PAX headers and your platform didn't have a native
tar implementation (Windows), the module would contain junk PaxHeader directories.

This is due to the default POSIX behavior programmed in to minitar (the ruby tar
implementation used for platforms with out native tar) for an unknown typeflag,
such as those used in PAX headers, is to treat it as a regular file and extract it.

This commit adds a pre-scan step to our use of minitar for unpacking that finds
all the files with standard typeflags (0-7) and then only unpacks those, thus ignoring
any Pax typeflags like 'x' or 'g'.
@puppetcla
Copy link

CLA signed by all contributors.

@andersonmills
Copy link
Contributor

I believe this will fly. I tested it before and after the changes, forcing minitar to be used instead of gnutar and saw the errant and then correct behavior.

andersonmills added a commit that referenced this pull request Jul 16, 2014
@andersonmills andersonmills merged commit 1029e2b into puppetlabs:master Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants