-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
feat: Allow usage of sudo [while not accessing root] in x.py #95671
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
@gimbles could you change this to check SUDO_USER instead of adding more configuration options? The place to add flags is in the |
@rustbot label A-rustbuild |
Sure! |
Ah, so they do. @chbaker0 can you confirm whether making the SUDO_CHECK smarter would help you or not? I do see that you're calling |
My bad. Looks like SUDO_USER is the user who invoked sudo rather than who is being impersonated. The sudo check can still be made smarter, by checking the regular UID. If sudo is not being used to run as root, instead just as a different user, then the user probably intended it. build.py is just a helper script to check out, configure, and build Rust (using x.py) for use in Chromium |
Sounds good :) I found that |
So should I remove the environment variable check and change this line to check if |
|
Thank you! I appreciate this a lot! |
Can you adjust the PR description to reflect the new state of this PR, and squash commits? r=me with that done. @rustbot author |
Updated the description and squashed the commits. |
@bors r=Mark-Simulacrum |
@gimbles: 🔑 Insufficient privileges: Not in reviewers |
Welp I think I'm..doing something wrong here. @Mark-Simulacrum So just manually pinging you 😅 |
@bors r+ |
📌 Commit 386ca6a has been approved by |
feat: Allow usage of sudo [while not accessing root] in x.py # Fixes This PR should fix rust-lang#93344 # Info Allows usage of sudo (while not accessing root) in x.py
feat: Allow usage of sudo [while not accessing root] in x.py # Fixes This PR should fix rust-lang#93344 # Info Allows usage of sudo (while not accessing root) in x.py
feat: Allow usage of sudo [while not accessing root] in x.py # Fixes This PR should fix rust-lang#93344 # Info Allows usage of sudo (while not accessing root) in x.py
⌛ Testing commit 386ca6a with merge 51d0df67856c2fe572c864cdef875437d90ef94b... |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors retry spurious |
Rollup of 5 pull requests Successful merges: - rust-lang#95671 (feat: Allow usage of sudo [while not accessing root] in x.py) - rust-lang#95716 (sess: warn w/out fluent bundle w/ user sysroot) - rust-lang#95820 (simplify const params diagnostic on stable) - rust-lang#95900 (Fix documentation for wasm32-unknown-unknown) - rust-lang#95947 (`impl const Default for Box<[T]>` and `Box<str>`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
…lacrum Use `getuid` to check instead of `USER` env var in rustbuild This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
…lacrum Use `getuid` to check instead of `USER` env var in rustbuild This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
…lacrum Use `getuid` to check instead of `USER` env var in rustbuild This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
…lacrum Use `getuid` to check instead of `USER` env var in rustbuild This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
Fixes
This PR should fix #93344
Info
Allows usage of sudo (while not accessing root) in x.py