feat: support handle very large uid/gid in PAX style tar #333
Merged
Conversation
Signed-off-by: Qinqi Qu <[email protected]>
jiangliu
reviewed
Jul 18, 2023
| fn next_entry_raw( | ||
| &mut self, | ||
| pax_size: Option<u64>, | ||
| pax_extensions: &Option<Vec<u8>>, |
There was a problem hiding this comment.
How about using pax_extensions: Option<&[u8]>>?
jiangliu
reviewed
Jul 18, 2023
| let mut pax_gid: Option<u64> = None; | ||
| if let Some(pax_extensions_ref) = &pax_extensions { | ||
| pax_size = pax_extensions_value(pax_extensions_ref, PAX_SIZE); | ||
| pax_uid = pax_extensions_value(pax_extensions_ref, PAX_UID); |
There was a problem hiding this comment.
How about
if let Some(uid) = pax_extensions_value(pax_extensions_ref, PAX_UID) {
header.set_uid(uid);
}
Signed-off-by: Qinqi Qu <[email protected]>
This commit add process to read large uid/gid from PAX extensions to fix very large UIDs/GIDs (>=2097151, limit of USTAR tar) lost in PAX style tar during unpack. Fix: composefs#332 Signed-off-by: Qinqi Qu <[email protected]>
Contributor
Author
|
@alexcrichton Hi Alex, could you take a look when you have time? Thanks! |
Contributor
Author
|
@alexcrichton Thanks for your review! |
ararslan
pushed a commit
to ararslan/binstall-tar
that referenced
this pull request
Jun 6, 2024
* refactor pax_extensions_size() to pax_extensions_value() Signed-off-by: Qinqi Qu <[email protected]> * make the handling of pax extensions more generic Signed-off-by: Qinqi Qu <[email protected]> * feat: support handle very large uid/gid in PAX style tar This commit add process to read large uid/gid from PAX extensions to fix very large UIDs/GIDs (>=2097151, limit of USTAR tar) lost in PAX style tar during unpack. Fix: composefs#332 Signed-off-by: Qinqi Qu <[email protected]> --------- Signed-off-by: Qinqi Qu <[email protected]> (cherry picked from commit 1d37489)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit add process to read large uid/gid from PAX extensions
to fix very large UIDs/GIDs (>=2097151, limit of USTAR tar) lost
in PAX style tar during unpack.
Fix: #332