From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43723: 27.1; Errors in file-extended-attributes prevent from saving buffer Date: Mon, 06 Jun 2022 19:53:34 +0300 Message-ID: <8335gh91ip.fsf@gnu.org> References: <83sgaziav1.fsf@gnu.org> <87zgiprccq.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25099"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43723@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 06 18:54:12 2022 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 1nyFzW-0006K5-P6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jun 2022 18:54:10 +0200 Original-Received: from localhost ([::1]:47918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyFzV-0001TJ-SQ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jun 2022 12:54:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyFzO-0001Rb-PT for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2022 12:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyFzO-00075o-Gm for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2022 12:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyFzO-0003xa-Eg for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2022 12:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jun 2022 16:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43723 X-GNU-PR-Package: emacs Original-Received: via spool by 43723-submit@debbugs.gnu.org id=B43723.165453443515202 (code B ref 43723); Mon, 06 Jun 2022 16:54:02 +0000 Original-Received: (at 43723) by debbugs.gnu.org; 6 Jun 2022 16:53:55 +0000 Original-Received: from localhost ([127.0.0.1]:36642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyFzH-0003x7-5x for submit@debbugs.gnu.org; Mon, 06 Jun 2022 12:53:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyFzD-0003wg-Sm for 43723@debbugs.gnu.org; Mon, 06 Jun 2022 12:53:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyFz8-00072B-HJ; Mon, 06 Jun 2022 12:53:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=B4qA0D6yLt5evSPO1geOPDYMBnAf1rFYMa62HcBkSho=; b=rXoe+3gL6nVv rurZHuT9IweqXD2sBM7Z74U3Ve21TetqR92+s/Dclp0o2XctahBngjM9SmQAbeDy9/xKZuAxoPH2y Y2O7msiekTB/Yu7UC50n6r8dQ9bPFbHaOLIoTASIqSNjlcq+JR3OUQu/ooj0BWBbevQCjZeDYK6LQ hU6dVkHjrQm+vIYTiJRr/DShVpKFAaEYN8HhI/t3sumWjnX0NgbXlmMfTWycIKa1BR7ckVHpIerZq qZnj0FjEOKuZCHlVVPJKSHLZHiE375sCo5qQBOLTqemo+c77Qy+jpzupnj2AXoMUL0wQI1B4nmdvY Cc7+I1t0irXwQq2cl4jFqg==; Original-Received: from [87.69.77.57] (port=4161 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyFz7-0002yI-9H; Mon, 06 Jun 2022 12:53:45 -0400 In-Reply-To: <87zgiprccq.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 06 Jun 2022 18:22:13 +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:233805 Archived-At: > From: Lars Ingebrigtsen > Cc: 43723@debbugs.gnu.org > Date: Mon, 06 Jun 2022 18:22:13 +0200 > > Eli Zaretskii writes: > > > When some volume is mounted such that file-extended-attributes fails > > for files there (because the agent used to mount doesn't support ACLs > > or SELinux), this prevents users from saving their edits to files on > > that volume, because file-extended-attributes signals an error. This > > appears as a regression to users because Emacs 26 silently ignored > > such errors. > > > > To allow users to save the files in these cases, but still keep them > > informed about the loss of potentially important attributes, Emacs > > should probably warn about this, allow the user to decide he/she wants > > to ignore the problem, and record this fact somewhere, to avoid asking > > the same question again for the same volume. > > Do you have a test case to reproduce this problem? I don't really use > SELinux myself... No, I don't have a recipe. This bug report was the result of this discussion on emacs-devel: https://lists.gnu.org/archive/html/emacs-devel/2020-09/msg02248.html The basic concern is that Emacs 26 silently ignored errors in file-acl and file-selinux-context, whereas Emacs 27 and later doesn't ignore them. My point was that preventing the user from saving the edits just because we cannot preserve the ACLs is too radical, since most users don't care about ACLs, and because support for ACLs on volumes mounted by all kinds of network disk drivers that have trouble mapping extended attributes between different systems. You can easily simulate this situation by writing a replacement for file-acl that always signals a file-error, or advising it to that effect.