From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.devel Subject: Re: Emacs creates emacs.d/ as root when using sudo Date: Tue, 02 Jul 2019 09:16:00 +0300 Message-ID: <87blyddkrj.fsf@iki.fi> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="222136"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) Cc: emacs-devel@gnu.org To: Jeffrey Walton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 02 09:19:33 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hiD4f-000ve3-5O for ged-emacs-devel@m.gmane.org; Tue, 02 Jul 2019 09:19:33 +0200 Original-Received: from localhost ([::1]:49878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiD4d-0004RK-2d for ged-emacs-devel@m.gmane.org; Tue, 02 Jul 2019 03:19:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60267) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiC5g-00032x-BJ for emacs-devel@gnu.org; Tue, 02 Jul 2019 02:16:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiC5Y-0007xH-1e for emacs-devel@gnu.org; Tue, 02 Jul 2019 02:16:28 -0400 Original-Received: from mail.kapsi.fi ([2001:67c:1be8::25]:60571) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiC5Q-0007XS-53 for emacs-devel@gnu.org; Tue, 02 Jul 2019 02:16:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Vq3B196+4h1KoV+8oGsrLZ1RYIpwT0+yYTdXzoju8vA=; b=ynALZe1FgHeXZMa1IaJ/G0lDQZ lJ+1PhRDgg4vd5WjL4UzNHttXWFTn6svl9E+KraOM11GpglAglThI0+0R1qyYm19PO9HunwIO7t0r 80QbUpnAsg7m24M9sM2G/sXnwAjMNymXcK+tMPxyXwMByg76NJ1hVGTPnme5LJzoFdGgbg93KLSt3 sQIlBRpJCr1tnc/gEEGPan6640vhtxjqIac1Hh3wcI8eOUwcOpf9ifDJLY5ERWrnoTBSS5/as204W yI9HXjZ42W4cSUdyxmf/5IY89pb4AA3vUcQ0wQs0nluzTYHRNDZ/5xy3/OoY8IMFeLYlsiIn1cLAr EG8lnKkw==; Original-Received: from mobile-access-bceea1-41.dhcp.inet.fi ([188.238.161.41] helo=mithlond) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hiC5D-0004Gt-Mu; Tue, 02 Jul 2019 09:16:03 +0300 In-Reply-To: (Jeffrey Walton's message of "Mon, 1 Jul 2019 14:01:58 -0400") X-SA-Exim-Connect-IP: 188.238.161.41 X-SA-Exim-Mail-From: tlikonen@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:67c:1be8::25 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238290 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jeffrey Walton [2019-07-01 14:01:58-04:00] wrote: > I think emacs should be creating files in user's $HOME as $SUDO_USER, > not root. Or, emacs should be creating .emacs.d/ in /root, not user's > $HOME. This is about sudo's settings, not Emacs's. See sudo's option "-H" (man sudo): -H, --set-home Request that the security policy set the HOME environment variable to the home directory specified by the target user's password database entry. Depending on the policy, this may be the default behavior. Or "man sudoers": always_set_home If enabled, sudo will set the HOME environment vari= =E2=80=90 able to the home directory of the target user (which is root unless the -u option is used). This effec= =E2=80=90 tively means that the -H option is always implied. Note that by default, HOME will be set to the home directory of the target user when the env_reset option is enabled, so always_set_home only has an effect for configurations where either env_reset is disabled or HOME is present in the env_keep list. This flag is off by default. =2D-=20 /// Teemu Likonen // // PGP: 4E1055DC84E9DFF613D78557719D69D324539450 /// --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEkhZiiC54Bnj5a16Skzo1BB5+rVEFAl0a9qAACgkQkzo1BB5+ rVFoPgf8CkNW+zLTRbuPTta/86pJG7Sp1JK3PkAc7jN46rxIDkmoKYi9WzqRlTBT f0Q7lgC38LMdnCWbfX6aODjYpHNSoe3BsTSP80n4amQIIhdxrhsCfiGFSQrdmX28 CkY0BoAOO6ngykJrJakRa5CMZNXkJ8wdet2ZIIXkc9MdvFxwLZzRdSeE5hljAnx/ nsFOurdJ3BAuY3ERS0HCeF7dGwkr5ho8x4dMRa5zW6/TxAPQXLE2caFDOAFTra3w P2UT3hwxN3FpYkVGl332HK9acAJNCe+l7A32fX5rEOYSQXcZe3ds5yCJ4XKhzRio i9dRQdj0Au+2YE+mhhFlHH17IV3Lpw== =mQDj -----END PGP SIGNATURE----- --=-=-=--