From: "Michalis V." <mvar.40k@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: "Michalis V." <mvar.40k@gmail.com>,
11912@debbugs.gnu.org, Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#11912: 24.1; 'M' in Dired on a symlink does not refresh the display
Date: Wed, 25 Aug 2021 11:37:34 +0300 [thread overview]
Message-ID: <877dg9vs1d.fsf@cnu407c2zx.nsn-intra.net> (raw)
In-Reply-To: <87fsuyonpv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 24 Aug 2021 17:40:28 +0200")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> In Linux you can't change the permissions on a symlink (they're always
> 777):
>
> chmod never changes the permissions of symbolic links; the chmod system
> call cannot change their permissions. This is not a problem since the
> permissions of symbolic links are never used.
>
> So I'm surprised that the `M' command even tries to do the chmod on the
> symlink. This was apparently done as part of a security audit:
>
> commit 9d626dffc6ba62c0d7a1a5c712f576ed8684fd66
> Author: Paul Eggert <eggert@cs.ucla.edu>
> AuthorDate: Sun Feb 23 16:19:42 2020 -0800
>
> Add 'nofollow' flag to set-file-modes etc.
>
> This avoids some race conditions (Bug#39683). E.g., if some other
> program changes a file to a symlink between the time Emacs creates
> the file and the time it changes the file’s permissions, using the
> new flag prevents Emacs from inadvertently changing the
> permissions of a victim in some completely unrelated directory.
>
> Hm. I'm not sure why this should affect the `M' command in dired, though...
>
> I've added Paul to the CCs; perhaps he has some comments.
that's true; but doing chmod on the symlink from bash will actually
have effect on the symlinked file itself, so from a user perspective
i'd expect dired to behave similarly (that is, M to resolve the symlink
and apply the chmod mask to the actual file). But i never thought of
race conditions and potential security problems so the current behavior
looks like the best one.
thanks,
Michalis
prev parent reply other threads:[~2021-08-25 8:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 16:30 bug#11912: 24.1; 'M' in Dired on a symlink does not refresh the display Eli Zaretskii
2021-08-24 10:23 ` Michalis V.
2021-08-24 15:40 ` Lars Ingebrigtsen
2021-08-24 17:32 ` Paul Eggert
2021-08-25 10:57 ` Lars Ingebrigtsen
2021-08-25 17:59 ` Paul Eggert
2021-08-26 13:52 ` Lars Ingebrigtsen
2021-08-26 3:57 ` Richard Stallman
2021-08-26 13:54 ` Lars Ingebrigtsen
2021-08-26 14:07 ` Andreas Schwab
2021-08-26 16:52 ` Paul Eggert
2021-08-27 3:30 ` Richard Stallman
2021-08-25 8:37 ` Michalis V. [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=877dg9vs1d.fsf@cnu407c2zx.nsn-intra.net \
--to=mvar.40k@gmail.com \
--cc=11912@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=larsi@gnus.org \
/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.