Skip to content

Avoid leaking file metadata (mtime/UID/GID) in rlibs through the ar crate. #908

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

Merged
merged 1 commit into from
Aug 17, 2022
Merged

Avoid leaking file metadata (mtime/UID/GID) in rlibs through the ar crate. #908

merged 1 commit into from
Aug 17, 2022

Conversation

eddyb
Copy link
Contributor

@eddyb eddyb commented Aug 17, 2022

Fixes #889 (but do not merge until @Nehliin can confirm it works on GCP).

Both ways to test this from #889 (comment) pass cleanly now:

test result: ok. 184 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 25.09s

1999999997@a87f7a319144:~/rust-gpu$ id
uid=1999999997(1999999997) gid=1899999996(1899999996) groups=1899999996(1899999996)
$ find target -type f -name '*.rlib' -exec bash -c 'ar tv "{}" | grep -v 0/0 > /dev/null && (echo "{}:"; ar tv "{}"; echo)' ';'

(no output from that find command, i.e. no .rlib files with UIDs/GIDs embedded in them, anymore)

@eddyb eddyb requested a review from oisyn as a code owner August 17, 2022 10:23
Copy link

@Nehliin Nehliin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm this fixes the issue! Thanks!

@eddyb eddyb merged commit a99fd43 into EmbarkStudios:main Aug 17, 2022
@eddyb eddyb deleted the ar-metaless branch August 17, 2022 16:29
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.

Invalid/corrupt ar headers in .rlibs, in high-UID/GID VMs/containers.
2 participants