Skip to content

Commit 5bc0aaf

Browse files
author
Marc Haber
committed
more env_keep suggestions from debian
This is what Debian has in its default sudoers. This has grown from decades of processing Debian bug reports. Feel free to accept some of them.
1 parent 8e5a132 commit 5bc0aaf

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

plugins/sudoers/sudoers.in

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,25 @@ Defaults!@visudo@ env_keep += "SUDO_EDITOR EDITOR VISUAL"
8484
## equivalent users (group sudo)
8585
# Defaults:%sudo env_keep += "http_proxy https_proxy ftp_proxy all_proxy no_proxy"
8686
##
87+
## Uncomment to preserve environment variables for grep
88+
# Defaults:%sudo env_keep += "GREP_COLOR"
89+
##
90+
## Uncomment to preserve git related environment. While you shouldn't
91+
## normally run git as root, you need to with etckeeper
92+
# Defaults:%sudo env_keep += "GIT_AUTHOR_* GIT_COMMITTER_*"
93+
##
94+
## Uncomment to preserve Debian-related environment variables. root
95+
## won't have sensible values for them.
96+
# Defaults:%sudo env_keep += "EMAIL DEBEMAIL DEBFULLNAME"
97+
##
98+
## Uncomment to allow root to use the calling user's ssh agent
99+
## transparently. This enabled "sudo scp" or "sudo rsync"
100+
# Defaults:%sudo env_keep += "SSH_AGENT_PID SSH_AUTH_SOCK"
101+
##
102+
## Uncomment to allow root to use the calling user's gpg agent
103+
## transparently. This enabled "sudo scp" or "sudo rsync"
104+
# Defaults:%sudo env_keep += "GPG_AGENT_INFO"
105+
##
87106
## Uncomment to disable "use_pty" when running commands as root.
88107
## Commands run as non-root users will run in a pseudo-terminal,
89108
## not the user's own terminal, to prevent command injection.

0 commit comments

Comments
 (0)