Skip to content

[FEAT] Prevent loading Homebrew related scripts when the user is root. #628

@shubms

Description

@shubms

Describe the benefit this feature would provide to the project
brew.sh and brew-bash-completions.sh are loaded by default for every user. When using run0 to open a root shell, both these scripts source stuff from brew shellenv and /home/linuxbrew/.linuxbrew/etc/bash_completion.d. This would not be an issue if running multiple commands with run0 was as convenient as sudo, currently, there is a significant lag before polkit prompt is shown and authorization is not cached. Running a root shell is more convenient now.

Describe the solution you'd like
Auditing /etc/profile for loading anything other than root owned or locked down files (like what is down for bash's user shell).

Describe alternatives you've considered

  • Not using root shell.
  • Using run0 command.

Declaration

  • I declare that I have read the README and my feature request is in-scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomerspriority: highEssential functionality is missing or broken

    Type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions