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

Fix update to the Debian sudoers file #7908

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

andrew-grasso
Copy link
Contributor

Description

Fix for issue "Change to Debian sudoers file prevents passing of $TERM to sudo environment"

Commit c37b32b added two environment variables to the env_check sudoers config option which allows them to be passed through when using sudo, however the use of the = assignment operator in that commit overwrites the default environment variables normally included in env_check including TERM. Instead, it is better to use the += assignment operator to append the new environment variables to the already existing defaults.

Impacts

Before this fix, installing PacketFence on Debian caused issues with sudo when running commands like nano, less, vi, systemctl, and journalctl because the TERM environment variable was being stripped. After the fix, sudo once again works as expected and the two custom PF_ environment variables are still included in the check list which can be verified by running sudo -V as the root user with and without the fix applied and checking the "Environment variables to check for safety" section of the output.

Issue

fixes #7738

Delete branch after merge

YES

Checklist

(REQUIRED) - [yes, no or n/a]

  • Document the feature
  • Add OpenAPI specification
  • Add unit tests
  • Add acceptance tests (TestLink)

Bug Fixes

If an issue exists on Github, please refer to it (name) along with it's number...

@CLAassistant
Copy link

CLAassistant commented Nov 17, 2023

CLA assistant check
All committers have signed the CLA.

@andrew-grasso
Copy link
Contributor Author

Any feedback from maintainers on this? Any concerns or issues preventing it from being merged? @fdurand

@satkunas satkunas requested a review from JeGoi November 22, 2024 15:54
@satkunas satkunas added this to the PacketFence-14.1 milestone Nov 22, 2024
@JeGoi JeGoi merged commit c2ee24e into inverse-inc:devel Dec 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change to debian sudoers file prevents passing of $TERM to sudo environment
4 participants