Date: Sat, 22 May 2010 08:02:19 -0400 From: jhell <jhell@dataix.net> To: Andrew Reilly <areilly@bigpond.net.au> Cc: ports@freebsd.org Subject: Re: did sudo change the default sense of env_reset option? Message-ID: <4BF7C7CB.7070300@dataix.net> In-Reply-To: <20100522095237.GA62670@duncan.reilly.home> References: <20100522095237.GA62670@duncan.reilly.home>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------020500060907090708000406 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 05/22/2010 05:52, Andrew Reilly wrote: > Hi there, > > I haven't changed my configuration recently, but I've noticed > that sudo processes have stopped inheriting my environment > variables like MAKEOBJDIRPREFIX and PORTSDIR. I read the man > page, and tried sudo -E, and that brings back the "old" > behaviour, but that implies (according to the man page) that my > sudoers file has env_reset enabled, and it just doesn't. > > Hmm. Closer reading of man 5 sudoers says that env_reset is > *on* by default. This is new to me. > > Hmm. More digging in man pages: I need to add > Defaults !env_reset > under the #Defaults specification line. > > Any thoughts or suggestions? > > OK, so I've figured out the answer to my problem now, but since > I have seen one other post about the sudden disappearance of > MAKEOBJDIRPREFIX, and no obvious conversation about changes to > sudo, I'll post this anyway. Hope it helps someone. > > Cheers, > Attached is the copy of the sudoers.default take a look through it to see how to set a environment variable for use with portupgrade or portmaster etc... -- jhell --------------020500060907090708000406 Content-Type: text/plain; name="sudoers.default" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sudoers.default" # sudoers file. # # This file MUST be edited with the 'visudo' command as root. # Failure to use 'visudo' may result in syntax or file permission errors # that prevent sudo from running. # # See the sudoers man page for the details on how to write a sudoers file. # # Host alias specification # User alias specification # Cmnd alias specification # Defaults specification # Uncomment if needed to preserve environmental variables related to the # FreeBSD pkg_* utilities and fetch. #Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR PACKAGEROOT PACKAGESITE PKGDIR FTP_PASSIVE_MODE" # Additionally uncomment if needed to preserve environmental variables # related to portupgrade. #Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES PKGTOOLS_CONF" # Runas alias specification # User privilege specification root ALL=(ALL) ALL # Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL # Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL # Samples # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom # %users localhost=/sbin/shutdown -h now --------------020500060907090708000406--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BF7C7CB.7070300>