From: Francesco Potorti` <pot@gnu.org>
Cc: emacs-devel@gnu.org, Stefan Monnier <monnier+gnu/emacs@rum.cs.yale.edu>
Subject: Re: Dangerous: delete-file deletes current directory as root!!
Date: Sun, 13 Oct 2002 19:20:38 +0200 [thread overview]
Message-ID: <E180mPu-0001Pr-00@pot.cnuce.cnr.it> (raw)
In-Reply-To: <200210121824.g9CIOVu19938@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu)
> > > Now, I'm not sure what `delete-file' should do. Should it mimic `unlink'
> > > or should it first check that it is not called on a directory ?
> > Definitely the second one.
>
> Do you mean it for all cases, or only for interactive use ?
I mean for all cases. If we ever want to provide unlink(2) complete
functionality from inside Emacs (which I am not sure it is wise), we
should use a different function for that purpose.
> You say "I really mean it" but obviously you're not aware of the dangers
> since you think it's no more dangerous than running a shell. You don't
> realize the amount of code Emacs uses for the simplest operations
> and how many hooks and tricks it provides, all of them designed for
> the user's convenience but with very little thought given to the
> security implications ot to the case when the user is root (and
> can thus do things that would normally fail, as in your case).
I agree with what you say (also in the following, that I cut), but my
conclusions are different, based on experience. For many years I have
run Emacs as root in a dedicated text console and in a dedicated X
frame, as I often do system management. While I do not do almost
anything as root that I could do as a normal user, I happen to use Emacs
as root daily on GNU/Linux, and this is the first time I have used it on
Sun. The only difference between the two environments should be the
kernel and library.
In practice, I found that Emacs on GNU/Linux protects me better than the
shell does, when I am acting as root.
next prev parent reply other threads:[~2002-10-13 17:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-11 4:41 [root@mailserver.adm.unipi.it: Dangerous: delete-file deletes current directory as root!!] Richard Stallman
2002-10-11 19:32 ` Dangerous: delete-file deletes current directory as root!! Stefan Monnier
2002-10-11 19:44 ` Kai Großjohann
2002-10-11 23:56 ` Francesco Potorti`
2002-10-12 18:24 ` Stefan Monnier
2002-10-13 17:20 ` Francesco Potorti` [this message]
2002-10-13 22:47 ` Richard Stallman
2002-10-12 15:45 ` Richard Stallman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E180mPu-0001Pr-00@pot.cnuce.cnr.it \
--to=pot@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier+gnu/emacs@rum.cs.yale.edu \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).