From owner-freebsd-ports@FreeBSD.ORG Sat May 22 12:02:23 2010 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F609106564A for ; Sat, 22 May 2010 12:02:23 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id D54868FC17 for ; Sat, 22 May 2010 12:02:22 +0000 (UTC) Received: by gyh20 with SMTP id 20so1089645gyh.13 for ; Sat, 22 May 2010 05:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type; bh=KHg9u7yEl9eZsR5UQZ46mjvfGVwJTV2UJo8geviPC5k=; b=mpxZ2fc76eh4YQRf/dfk9AXDCeqkMBvaFbPcQtknVkuMq9olr2VROBdVDIsGwoKdRU iLiq52b8TNOXhn0F3DSwRtv6mehwprL68FoWvnotZegx1c+QRAAIQfGcstw8scVGF4++ KJUA+z7CyjcLSng1+e9y41P1P7Ve3gpn/ArX0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type; b=xeBDhsWMrbu2GchlyBig96c3ZJ522jaSeJXY8qZ7267op4u7uiGBm7l+8oAxkUugJH 0uQZs9DlY76K/Hd2O85j1GWNsoDhsN8RFNknJxGmzW7mNzDjEvW+dk+j0h9IKBPgkJtX epqSReRP1LO9lgpkYqwvrA85JcsOxO2v6L8Z4= Received: by 10.150.187.14 with SMTP id k14mr4527644ybf.199.1274529741940; Sat, 22 May 2010 05:02:21 -0700 (PDT) Received: from centel.dataix.local (adsl-99-181-129-134.dsl.klmzmi.sbcglobal.net [99.181.129.134]) by mx.google.com with ESMTPS id z42sm9246195ybc.18.2010.05.22.05.02.20 (version=SSLv3 cipher=RC4-MD5); Sat, 22 May 2010 05:02:20 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4BF7C7CB.7070300@dataix.net> Date: Sat, 22 May 2010 08:02:19 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100515 Thunderbird/3.0.4 MIME-Version: 1.0 To: Andrew Reilly References: <20100522095237.GA62670@duncan.reilly.home> In-Reply-To: <20100522095237.GA62670@duncan.reilly.home> X-Enigmail-Version: 1.0.1 OpenPGP: id=89D8547E Content-Type: multipart/mixed; boundary="------------020500060907090708000406" Cc: ports@freebsd.org Subject: Re: did sudo change the default sense of env_reset option? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 12:02:23 -0000 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--