From: Sven Joachim <svenjoac@gmx.de>
To: MON KEY <monkey@sandpframing.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: visudo with Emacs
Date: Mon, 20 Jun 2011 19:52:45 +0200 [thread overview]
Message-ID: <871uyo1jbm.fsf@turtle.gmx.de> (raw)
In-Reply-To: <BANLkTimDZmuatNJyGstEOz98BB7OgKq0sw@mail.gmail.com> (MON KEY's message of "Mon, 20 Jun 2011 01:55:55 -0400")
On 2011-06-20 07:55 +0200, MON KEY wrote:
> Still, it seems there may be corner cases where the backup might not
> be entirely sanitary. I'm still curious though about what happens to
> the inode (and corresponding metadata) around /etc/sudoers.tmp~ e.g.:
>
> root> ls -ldZ /etc/sudoers.tmp~
> -rw-------. root root unconfined_u:object_r:etc_t:s0 /etc/sudoers.tmp~
The permissions are not what sudo expects (unless you have configured it
--with-sudoers-mode 600), and security context can only be preserved if
both visudo and Emacs support selinux.
>>> Restoring from /etc/sudoers.tmp~ would amount to restoring from the
>>> lock file not /etc/sudoers !
The recommended way to restore is to run visudo again and restore
sudoers.tmp within the editor. Otherwise you risk shooting yourself in
the foot, like you do when editing /etc/sudoers directly.
Cheers,
Sven
prev parent reply other threads:[~2011-06-20 17:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-18 21:48 visudo with Emacs MON KEY
2011-06-19 2:54 ` Eli Zaretskii
2011-06-19 20:46 ` MON KEY
2011-06-19 21:25 ` Sven Joachim
2011-06-20 5:55 ` MON KEY
2011-06-20 17:52 ` Sven Joachim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871uyo1jbm.fsf@turtle.gmx.de \
--to=svenjoac@gmx.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monkey@sandpframing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.