From: Todd C. Miller Date: Sat, 25 Jun 2005 21:46:16 +0000 (+0000) Subject: Preserve DISPLAY environment variable by default. X-Git-Tag: SUDO_1_7_0~627 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f90cfbd893b8f33cf10d338b97a7cee06ab8a26;p=sudo Preserve DISPLAY environment variable by default. --- diff --git a/env.c b/env.c index d60483080..bc61fb44d 100644 --- a/env.c +++ b/env.c @@ -160,6 +160,7 @@ static const char *initial_checkenv_table[] = { */ static const char *initial_keepenv_table[] = { "KRB5CCNAME", + "DISPLAY", "PATH", "TERM", "TZ", diff --git a/sudo.pod b/sudo.pod index d850d5d76..24468f929 100644 --- a/sudo.pod +++ b/sudo.pod @@ -185,8 +185,8 @@ in the L entry of the user that the command is being run as. The command name argument given to the shell begins with a `C<->' to tell the shell to run as a login shell. B attempts to change to that user's home directory before running the -shell. It also initializes the environment, leaving I -unchanged, setting I, I, I, I, and +shell. It also initializes the environment, leaving I +and I unchanged, setting I, I, I, I, and I, and unsetting all other environment variables. =item -K diff --git a/sudoers.pod b/sudoers.pod index a6cadd0cc..865e30c6f 100644 --- a/sudoers.pod +++ b/sudoers.pod @@ -437,13 +437,14 @@ function. =item env_reset If set, B will reset the environment to only contain the -following variables: C, C, C, C, C, -C and C (in addition to the C variables). -Of these, only C, C and C are copied unaltered from the old -environment. The other variables are set to default values (possibly -modified by the value of the I option). If the I -option is set, its value will be used for the C environment variable. -Other variables may be preserved via the I option. +following variables: C, C, C, C, +C, C, C and C (in addition to the C +variables). Of these, only C, C, C and C +are copied unaltered from the old environment. The other variables +are set to default values (possibly modified by the value of the +I option). If the I option is set, its +value will be used for the C environment variable. Other +variables may be preserved via the I option. This flag is I by default. =item use_loginclass