Fix update to the Debian sudoers file #7908
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 inenv_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
, andjournalctl
because the TERM environment variable was being stripped. After the fix, sudo once again works as expected and the two customPF_
environment variables are still included in the check list which can be verified by runningsudo -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]
Bug Fixes
If an issue exists on Github, please refer to it (name) along with it's number...