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

Do not pass stdin to login shell in self_test #1416

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

thomie
Copy link
Contributor

@thomie thomie commented Feb 7, 2025

Description

If stdin is /dev/tty -- such as when nix-installer.sh is piped into sh -- and one of the root user's login shell configuration files includes mesg n (as it does in Ubuntu 24.04), then running bash -l will modify the write permissions of /dev/tty.

Closes #1412.

Checklist
  • Formatted with cargo fmt
  • Built with nix build
  • Ran flake checks with nix flake check (except hydraJobs because they freeze up my laptop)
  • Added or updated relevant tests (leave unchecked if not applicable)
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • Linked to related issues (leave unchecked if not applicable)
Validating with install.determinate.systems

If a maintainer has added the upload to s3 label to this PR, it will become available for installation via install.determinate.systems:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/$PR_NUMBER | sh -s -- install

If `stdin` is `/dev/tty` -- such as when `nix-installer.sh` is piped
into `sh` -- and one of the root user's login shell configuration files
includes `mesg n` (as it does in Ubuntu 24.04), then running `bash -l`
will modify the write permissions of `/dev/tty`.

Closes DeterminateSystems#1412.
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

Thanks so much!

@cole-h cole-h merged commit 43b1eb8 into DeterminateSystems:main Feb 7, 2025
22 checks passed
@thomie
Copy link
Contributor Author

thomie commented Feb 7, 2025

Thanks for the merge 🚀

@thomie thomie deleted the fix-self-test branch February 7, 2025 16:26
@cole-h cole-h added this to the 0.36.0 milestone Feb 7, 2025
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.

Installation script modifies /dev/tty write permissions
2 participants