chunked: handle creating root directory#2194
Merged
openshift-merge-bot[bot] merged 6 commits intocontainers:mainfrom Dec 11, 2024
Merged
chunked: handle creating root directory#2194openshift-merge-bot[bot] merged 6 commits intocontainers:mainfrom
openshift-merge-bot[bot] merged 6 commits intocontainers:mainfrom
Conversation
rhatdan
reviewed
Dec 9, 2024
5c1461d to
09f5dfc
Compare
mtrmac
reviewed
Dec 9, 2024
09f5dfc to
541b348
Compare
mtrmac
reviewed
Dec 9, 2024
mtrmac
reviewed
Dec 9, 2024
541b348 to
5882567
Compare
ddaf701 to
b3357df
Compare
mtrmac
reviewed
Dec 10, 2024
af09f80 to
3383a19
Compare
cgwalters
approved these changes
Dec 10, 2024
Contributor
cgwalters
left a comment
There was a problem hiding this comment.
I didn't do any deep review but looks sane to me.
pkg/chunked/dump/dump.go
Outdated
|
|
||
| func dumpNode(out io.Writer, added map[string]*internal.FileMetadata, links map[string]int, verityDigests map[string]string, entry *internal.FileMetadata) error { | ||
| path := sanitizeName(entry.Name) | ||
| path := internal.CleanAbsPath(entry.Name) |
Contributor
There was a problem hiding this comment.
Right, composefs wants these to be absolute paths, so this makes sense.
(That said, it's kind of tempting to lift that and support relative paths too just on the principle that relative paths are IMO more "canonical" to use in use cases like tar)
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
mtrmac
reviewed
Dec 10, 2024
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
the returned file object is used later, so fail immediately if it could not be opened. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
3383a19 to
db90d12
Compare
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ihen the file name is the root directory, avoid using an empty string or the ".." name to open the file. The latter does not cause any security issues or unexpected behavior, it is logically incorrect and should be avoided. Closes: containers#2191 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
replacing the usage of a private function. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
db90d12 to
8fa5ca4
Compare
37 tasks
37 tasks
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.
if the file name is the root directory, do not attempt to use the base component since it is the empty string.
Closes: #2191