[Bug 982684] [NEW] sudo doesn't apply global environment settings from /etc/environment

Steve Langasek steve.langasek at canonical.com
Sun Apr 15 23:58:06 UTC 2012


Public bug reported:

In connection with the recent update-notifier changes
(https://wiki.ubuntu.com/Specs/UpdateNotifierPackageDataDownloader),
some users who were previously able to download the flashplugin via the
apt proxy settings are now unable to download it when running, e.g.,
'sudo apt-get install'.

The reason for this is that, even though a global proxy may be
configured in /etc/environment, sudo does not allow $http_proxy to be
inherited by default and does not reapply the environment from
/etc/environment (and from /etc/default/locale) via pam_env.

The first part is reasonable, but I question the second part.  Since
these are global config files, I believe it's safe for sudo to apply the
environment settings by default just as 'su' does; and the settings are
intended to apply globally, which would include to sudo sessions.

This would make update-notifier work more reliably for users with
proxies, and would probably help with a variety of other cases where
global variables are currently not being set as expected for sudo.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: sudo 1.8.3p1-1ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
Uname: Linux 3.2.0-22-generic x86_64
ApportVersion: 2.0.1-0ubuntu3
Architecture: amd64
CheckboxSubmission: 017452a27eca3c8b498abbfa5ef91db9
CheckboxSystem: ecaaad6fa1e0799a0aa1126bf620f39e
Date: Sun Apr 15 16:41:17 2012
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: sudo
UpgradeStatus: Upgraded to precise on 2011-11-08 (159 days ago)

** Affects: sudo (Ubuntu)
     Importance: Medium
         Status: Triaged


** Tags: amd64 apport-bug precise

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sudo in Ubuntu.
https://bugs.launchpad.net/bugs/982684

Title:
  sudo doesn't apply global environment settings from /etc/environment

Status in “sudo” package in Ubuntu:
  Triaged

Bug description:
  In connection with the recent update-notifier changes
  (https://wiki.ubuntu.com/Specs/UpdateNotifierPackageDataDownloader),
  some users who were previously able to download the flashplugin via
  the apt proxy settings are now unable to download it when running,
  e.g., 'sudo apt-get install'.

  The reason for this is that, even though a global proxy may be
  configured in /etc/environment, sudo does not allow $http_proxy to be
  inherited by default and does not reapply the environment from
  /etc/environment (and from /etc/default/locale) via pam_env.

  The first part is reasonable, but I question the second part.  Since
  these are global config files, I believe it's safe for sudo to apply
  the environment settings by default just as 'su' does; and the
  settings are intended to apply globally, which would include to sudo
  sessions.

  This would make update-notifier work more reliably for users with
  proxies, and would probably help with a variety of other cases where
  global variables are currently not being set as expected for sudo.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: sudo 1.8.3p1-1ubuntu3
  ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
  Uname: Linux 3.2.0-22-generic x86_64
  ApportVersion: 2.0.1-0ubuntu3
  Architecture: amd64
  CheckboxSubmission: 017452a27eca3c8b498abbfa5ef91db9
  CheckboxSystem: ecaaad6fa1e0799a0aa1126bf620f39e
  Date: Sun Apr 15 16:41:17 2012
  InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
  ProcEnviron:
   TERM=xterm
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: sudo
  UpgradeStatus: Upgraded to precise on 2011-11-08 (159 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/982684/+subscriptions




More information about the foundations-bugs mailing list