-
Notifications
You must be signed in to change notification settings - Fork 240
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
pkg/archive: avoid user lookups when generating tarball #1837
pkg/archive: avoid user lookups when generating tarball #1837
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3f13337
to
e0bd86a
Compare
LGTM |
e0bd86a
to
44056d4
Compare
green now |
LGTM |
pkg/archive/archive.go
Outdated
// sysStatOverride, if non-nil, populates hdr from system-dependent fields of fi. | ||
var sysStatOverride func(fi os.FileInfo, hdr *tar.Header) error | ||
|
||
func FileInfoHeaderNoLookups(fi os.FileInfo, link string) (*tar.Header, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be exported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexported and pushed a new version.
This change introduces a new approach to generating tar headers in a way that avoids system-dependent lookups and potential calls to glibc, enhancing portability and security. The same logic is used by Moby, and the override function is based on code from Moby. Closes: containers#1836 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
44056d4
to
e024854
Compare
/lgtm |
This change introduces a new approach to generating tar headers in a way that avoids system-dependent lookups and potential calls to glibc, enhancing portability and security.
The same logic is used by Moby, and the override function is based on code from Moby.
Closes: #1836