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

Installer tries create directory outside DESTDIR #80238

Closed
yshui opened this issue Dec 20, 2020 · 0 comments · Fixed by #80240
Closed

Installer tries create directory outside DESTDIR #80238

yshui opened this issue Dec 20, 2020 · 0 comments · Fixed by #80240
Assignees
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@yshui
Copy link
Contributor

yshui commented Dec 20, 2020

let prefix = builder.config.prefix.as_ref().map_or(prefix_default, |p| {
fs::create_dir_all(p)
.unwrap_or_else(|err| panic!("could not create {}: {}", p.display(), err));
fs::canonicalize(p)
.unwrap_or_else(|err| panic!("could not canonicalize {}: {}", p.display(), err))
});

This creates the prefix directory without DESTDIR prepended.

@yshui yshui added the C-bug Category: This is a bug. label Dec 20, 2020
@camelid camelid added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Dec 20, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Dec 21, 2020
make sure installer only creates directories in DESTDIR

Fixes rust-lang#80238

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Dec 21, 2020
make sure installer only creates directories in DESTDIR

Fixes rust-lang#80238

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@bors bors closed this as completed in fbc9d50 Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants