OpenBSD Journal

Sudo Changes, Ports and You

Contributed by merdely on from the reiteration dept.

Following up on a previous story, the recent changes to sudo(8) impact that way ports and pkg_* tools work when used with sudo. Sudo now scrubs the environment before executing commands run with sudo. That means that commands like pkg_add will not know about $PKG_PATH (and other variables).

Note the following line in /etc/sudoers which will be in 4.2:

Defaults env_keep +="DESTDIR FETCH_CMD FLAVOR FTPMODE MAKE MULTI_PACKAGES OKAY_FILES PKG_DBDIR PKG_DESTDIR PKG_CACHE PKG_PATH PKG_TMPDIR PORTSDIR RELEASEDIR SUBPACKAGE"

People using ports have to be particularly aware of these changes. Many people are already being caught with this and we want to avoid flooding the mailing list with these problems. Make sure you update your /etc/sudoers file when you upgrade.

[Update 2007/08/16: millert pointed out inaccuracies in the story which have been corrected.]

(Comments are closed)


Comments
  1. By Anonymous Coward (70.169.167.212) on

    Thank you, OpenBSD team, once again for your proactive approach to security. You are making the Internet safer by your efforts.

    We'll be on the lookout for this. Thanks for the tips.

    Comments
    1. By Anonymous Coward (71.126.177.187) on

      > Thank you, OpenBSD team, once again for your proactive approach to security. You are making the Internet safer by your efforts.
      >
      > We'll be on the lookout for this. Thanks for the tips.

      Hey, I'm all about security. Go Team. But still. That's some pretty sleazy self-linking you snuck in there.

      Of course, that's if you want google to find you by searching for a period...

    2. By Anonymous Coward (24.37.242.64) on

      > Thank you, OpenBSD team, once again for your proactive approach to security. You are making the Internet safer by your efforts.
      >
      > We'll be on the lookout for this. Thanks for the tips.

      Why the two email addresses?

      Comments
      1. By Andrew Fresh (andrew) on http://openbsd.somedomain.net

        > > Thank you, OpenBSD team, once again for your proactive approach to security. You are making the Internet safer by your efforts.
        > >
        > > We'll be on the lookout for this. Thanks for the tips.
        >
        > Why the two email addresses?

        I believe they are "Spam-Trap" addresses. See spamd(8).

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]