Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow preservation of variables in the default list to be disabled

Open
#424 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
cli

Research direction

The issue points to plugins/sudoers/env.c and initial_keepenv_table; start by reading how that table controls preserved variables and how sudo handles environment options. The requested outcome is an option such as --no-preserve-env=VAR that disables preservation of a selected default variable; no test or further implementation details are identified in the issue.

Written by the indexing model from the issue text.

Description

If I'm reading the code correctly default variables that are enabled for preservation are specified in the initial_keepenv_table variable in plugins/sudoers/env.c, correct? If possible can preservation of these variables be allowed to be disabled through an option like --no-preserve-env=VAR? I know env -u VAR sudo ... can be a good workaround but better have the capability in sudo itself since it's the one responsible for allowing the default list.

Dominant language
C
Stars
1.7k
Forks
306
Avg merge
1d 3h
Merged PRs (30d)
21

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sudo-project/sudo

All issues in sudo-project/sudo

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.