From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Michalis V." Newsgroups: gmane.emacs.bugs 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 Message-ID: <877dg9vs1d.fsf@cnu407c2zx.nsn-intra.net> References: <83txxeb6q8.fsf@gnu.org> <87tujf9m52.fsf@cnu407c2zx.nsn-intra.net> <87fsuyonpv.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37205"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Michalis V." , 11912@debbugs.gnu.org, Paul Eggert To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 25 10:38:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIoQJ-0009Rq-99 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Aug 2021 10:38:15 +0200 Original-Received: from localhost ([::1]:37240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIoQG-0007be-Vj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Aug 2021 04:38:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIoQ6-0007bT-DE for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 04:38:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34091) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIoQ6-0007Ce-5k for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 04:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mIoQ5-0004zd-VA for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 04:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Michalis V." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 08:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11912 X-GNU-PR-Package: emacs Original-Received: via spool by 11912-submit@debbugs.gnu.org id=B11912.162988067619183 (code B ref 11912); Wed, 25 Aug 2021 08:38:01 +0000 Original-Received: (at 11912) by debbugs.gnu.org; 25 Aug 2021 08:37:56 +0000 Original-Received: from localhost ([127.0.0.1]:45637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIoQ0-0004zL-Jg for submit@debbugs.gnu.org; Wed, 25 Aug 2021 04:37:56 -0400 Original-Received: from mail-wm1-f46.google.com ([209.85.128.46]:36713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIoPy-0004z5-3P for 11912@debbugs.gnu.org; Wed, 25 Aug 2021 04:37:54 -0400 Original-Received: by mail-wm1-f46.google.com with SMTP id 79-20020a1c0452000000b002e6cf79e572so3687437wme.1 for <11912@debbugs.gnu.org>; Wed, 25 Aug 2021 01:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=kuqOxqIzo9jecJknjXsH2KElKty+3YTUEkOqv30A2q8=; b=Euw3X0gIeoIHjb3yplhwaSIWwJHbI1umKVqTLN4qunJwalsgnrw+Zrymd1CURPco+H 1/SABHkMJbFeTILVOE38dB9eXM8YQifLE4OkZpmYOMdJ5lMicdePcnBw+yrq+V3R4lR+ TaSB9b8+yXk7D0HH6D8jSMo73RG5gkSs3eUbPAcJq2X3VCnG8S2neqtkixMiKr+uIaAX R0+HfROIo9XzjfwlOg0SpgiQ0i9mb6uSozrz8/xz5Gu0fk2z1qvUnikLnQmhZTMlCTct oEft+Bz1DR9q0KNj9J6XmcxB4GLoi2563cbBnknJpqz32nD+J2sssYwj+Uq+g4JF/u5d eb0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=kuqOxqIzo9jecJknjXsH2KElKty+3YTUEkOqv30A2q8=; b=MqFp9jApVPJfeR+3HnvN6xJA6GQF5jcmeyCo6HXpo10qBzOhWd3QLnmAMfuhdVnPtD J7XVf3fjvsEUZ7i4F+z0oIVtJ+nBBJOJqsYr5TlUQnwUhHjmcZB8Bu7xyfc42zFQXzgL TEOT5zpxKMOYJegabf37rp09Cp6WHDHb45+ELpRz9dLyBc3fue0mZ/9nAGPqbO4DCXlv CH4ACoE0+uhh2CMcqr77yQNSDM6g1jkiTarD7T+ZAJj/TUogUDJXmpUdrX/1UWFwa6p0 VaEBTAZpROy5MrLl8gdE19giCuZOtVDhsIVfbso3mDxj8oExM8K4orY9g1k5gBL5x+z9 LQWA== X-Gm-Message-State: AOAM532v6P500EW4RvnMyzaZUYlJ5U2Y70YAO/fCNUliIq218FnlPw6a ni3/i+XbM2TfnOVObNvHby8= X-Google-Smtp-Source: ABdhPJxaRzWMdNAhBGWyAgZbOCgwEjxGsXmrIXjcsgQwfRdXspu8KzDyrkpjb/z3/GMOltMYoCactA== X-Received: by 2002:a05:600c:3507:: with SMTP id h7mr5398556wmq.144.1629880668180; Wed, 25 Aug 2021 01:37:48 -0700 (PDT) Original-Received: from cnu407c2zx.nsn-intra.net (109-178-141-246.pat.ren.cosmote.net. [109.178.141.246]) by smtp.gmail.com with ESMTPSA id a12sm3681395wmm.42.2021.08.25.01.37.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Aug 2021 01:37:47 -0700 (PDT) X-Google-Original-From: "Michalis V." In-Reply-To: <87fsuyonpv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 24 Aug 2021 17:40:28 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212587 Archived-At: Lars Ingebrigtsen 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 s= ystem > call cannot change their permissions. This is not a problem since= the > permissions of symbolic links are never used.=20 > > 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 > AuthorDate: Sun Feb 23 16:19:42 2020 -0800 > > Add 'nofollow' flag to set-file-modes etc. >=20=20=20=20=20 > 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=E2=80=99s permissions, usin= g 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