Giter Site home page Giter Site logo

Comments (2)

kuba avatar kuba commented on May 12, 2024

Seems like it is actually a security bug in Ubuntu:

$ sudo python -c 'import sys; print sys.path'
['', '/home/jakub/.local/lib/python2.7/site-packages/letsencrypt-0.1-py2.7.egg', '/home/jakub/.local/lib/python2.7/site-packages/python2_pythondialog-3.0.1-py2.7.egg', '/home/jakub/.local/lib/python2.7/site-packages/pycrypto-2.6.1-py2.7-linux-x86_64.egg', '/home/jakub/.local/lib/python2.7/site-packages/M2Crypto-0.22.3-py2.7-linux-x86_64.egg', '/home/jakub/.local/lib/python2.7/site-packages/jsonschema-2.4.0-py2.7.egg', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/jakub/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages']
$ HOME=foo sudo python -c 'import sys; print sys.path'
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
$ HOME=foo sudo python -c 'import os; print os.environ["HOME"]'
foo
$ sudo grep env_reset /etc/sudoers
Defaults        env_reset

while man sudo says:

ENVIRONMENT
     sudo utilizes the following environment variables.  The security policy has control over the actual content of the command's environment.

...
     HOME             Set to the home directory of the target user if -i or -H are specified, env_reset or always_set_home are set in sudoers, or when the -s option is specified and set_home is
                      set in sudoers.

from certbot.

kuba avatar kuba commented on May 12, 2024

Fixed in #48.

from certbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.