From unknown Sat Jun 21 12:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11245: 24.0.95; set-file-selinux-context fails when the filesystem doesn't support contexts Resent-From: goeran@uddeborg.se Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Apr 2012 11:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11245 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11245@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133448938117000 (code B ref -1); Sun, 15 Apr 2012 11:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Apr 2012 11:29:41 +0000 Received: from localhost ([127.0.0.1]:59349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJNeG-0004Q8-Cg for submit@debbugs.gnu.org; Sun, 15 Apr 2012 07:29:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48374) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJNeD-0004Q1-L2 for submit@debbugs.gnu.org; Sun, 15 Apr 2012 07:29:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJNck-0001Wo-KR for submit@debbugs.gnu.org; Sun, 15 Apr 2012 07:28:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:55004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJNck-0001Wk-HG for submit@debbugs.gnu.org; Sun, 15 Apr 2012 07:28:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJNci-0003wM-Cc for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2012 07:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJNcf-0001Vw-0W for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2012 07:28:03 -0400 Received: from smtprelay-b11.telenor.se ([62.127.194.20]:43028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJNce-0001VV-Mg for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2012 07:28:00 -0400 Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id 646C2D9E3 for ; Sun, 15 Apr 2012 13:27:56 +0200 (CEST) X-SENDER-IP: [83.227.168.100] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkB1AG+vik9T46hkPGdsb2JhbABEhWaEQpkyAZEvGQEBAQE3NIIzMxMBRAIFIQIRAR0MCkuHdAeXYo44kV6BL4oIC4RvgRgElW2THoFUBg X-IronPort-AV: E=Sophos;i="4.75,425,1330902000"; d="scan'208";a="17140192" Received: from ua-83-227-168-100.cust.bredbandsbolaget.se (HELO mimmi.uddeborg.se) ([83.227.168.100]) by ipb4.telenor.se with ESMTP; 15 Apr 2012 13:27:55 +0200 Received: from freddi.uddeborg (freddi.uddeborg [172.17.0.3]) by mimmi.uddeborg.se (8.14.5/8.14.5) with ESMTP id q3FBRrV9026221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 15 Apr 2012 13:27:54 +0200 Received: from freddi.uddeborg (localhost [127.0.0.1]) by freddi.uddeborg (8.14.5/8.14.5) with ESMTP id q3FBRqjT016672 for ; Sun, 15 Apr 2012 13:27:52 +0200 Received: (from goeran@localhost) by freddi.uddeborg (8.14.5/8.14.4/Submit) id q3FBRqxc016671; Sun, 15 Apr 2012 13:27:52 +0200 From: goeran@uddeborg.se Date: Sun, 15 Apr 2012 13:27:51 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) After upgrading to emacs to the one in Fedora 17 test release, numbered 24.0.95, I started to get messages about emacs failing to write backup files, and it writing a %backup%~ file instead. Checking in the file system, emacs had successfully made a backup file. After a bit of investigation, I believe it has to do with emacs trying to set SELinux context on a file system which doesn't support it. In my case, my home directory is mounted via NFS. So to reproduce, I do the following, starting in a directory in an NFS file system: On the command line: freddi$ touch apa freddi$ ll -Z apa -rw-rw-r--. g=C3=B6ran g=C3=B6ran system_u:object_r:nfs_t:SystemLow apa freddi$ emacs -Q Then, in emacs: M-x s e t - v a r b a c k u b y t C-x C-f a p a a p a C-x C-s Now I get an error message: Cannot write backup file; backing up in ~/.emacs.d/%backup%~ But there is an (empty) file "apa~", so the backup DID succeed. My understanding is that the root cause is the function set-file-selinux-context in fileio.c failing with a file error when the lsetfilecon() call fails. But it is not really an error if it fails with errno set to ENOTSUP. A system which does support SELinux may very well have some parts of the file tree where you can't modify the context. Such as an NFS home directory. It seems to me that the case where lsetfilecon() fails with ENOTSUP should be handled in the same way as if is_selinux_enabled() returned false in the first place, i.e. just return without any error. Do I miss something? In GNU Emacs 24.0.95.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.10) of 2012-04-06 on x86-13.phx2.fedoraproject.org Windowing system distributor `Fedora Project', version 11.0.11002000 Configured using: `configure '--build=3Dx86_64-redhat-linux-gnu' '--host=3Dx86_64-redhat-linux-gnu' '--program-prefix=3D' '--disable-dependency-tracking' '--prefix=3D/usr' '--exec-prefix=3D/usr' '--bindir=3D/usr/bin' '--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc' '--datadir=3D/usr/share' '--includedir=3D/usr/include' '--libdir=3D/usr/lib64' '--libexecdir=3D/usr/libexec' '--localstatedir=3D/var' '--sharedstatedir=3D/var/lib' '--mandir=3D/usr/share/man' '--infodir=3D/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=3Dgtk' '--with-gpm=3Dno' '--with-wide-int' 'build_alias=3Dx86_64-redhat-linux-gnu' 'host_alias=3Dx86_64-redhat-linux-gnu' 'CFLAGS=3D-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector --param=3Dssp-buffer-size=3D4 -m64 -mtune=3Dgeneric' 'LDFLAGS=3D-Wl,-z,rel= ro '' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: sv_SE.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: (only . t) Recent input: M-x s e t - v a r b a c k u b=20 t C-x C-f a p a a=20 p a C-x C-s M-x r e p o r t - e m a Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Saving file /home/g=C3=B6ran/apa... Cannot write backup file; backing up in ~/.emacs.d/%backup%~ Wrote /home/g=C3=B6ran/apa Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cus-edit easymenu cus-start cus-load wid-edit help-fns time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From unknown Sat Jun 21 12:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11245: 24.0.95; set-file-selinux-context fails when the filesystem doesn't support contexts Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Apr 2012 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11245 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Karel Klic Cc: 11245@debbugs.gnu.org, goeran@uddeborg.se Received: via spool by 11245-submit@debbugs.gnu.org id=B11245.133459868620633 (code B ref 11245); Mon, 16 Apr 2012 17:52:02 +0000 Received: (at 11245) by debbugs.gnu.org; 16 Apr 2012 17:51:26 +0000 Received: from localhost ([127.0.0.1]:37156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJq5F-0005Mj-V6 for submit@debbugs.gnu.org; Mon, 16 Apr 2012 13:51:26 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:54098 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJq5C-0005Mb-3c for 11245@debbugs.gnu.org; Mon, 16 Apr 2012 13:51:24 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SJq57-00052p-15; Mon, 16 Apr 2012 13:51:17 -0400 From: Glenn Morris References: X-Spook: Firewalls S Box crypto anarchy Attorney General codes X-Ran: bHZo$-,j}23NNryN:f'=Ke9^Y5@1Q9o*]~GmeH%7vK/%`.&['Hw?j]nM@{T1?fT*~*hU1B X-Hue: white X-Attribution: GM Date: Mon, 16 Apr 2012 13:51:16 -0400 In-Reply-To: (goeran@uddeborg.se's message of "Sun, 15 Apr 2012 13:27:51 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi Karel, We received this bug report about the SELinux support that you wrote for Emacs. Could you take a look? Just hit reply-all to respond to the report. Thanks. http://debbugs.gnu.org/11245 goeran@uddeborg.se wrote: > After upgrading to emacs to the one in Fedora 17 test release, numbered > 24.0.95, I started to get messages about emacs failing to write backup > files, and it writing a %backup%~ file instead. Checking in the file > system, emacs had successfully made a backup file. After a bit of > investigation, I believe it has to do with emacs trying to set SELinux > context on a file system which doesn't support it. In my case, my home > directory is mounted via NFS. > > So to reproduce, I do the following, starting in a directory in an NFS > file system: > > On the command line: > freddi$ touch apa > freddi$ ll -Z apa > -rw-rw-r--. g=C3=B6ran g=C3=B6ran system_u:object_r:nfs_t:SystemLow a= pa > freddi$ emacs -Q > > Then, in emacs: > M-x s e t - v a r b a c k u b > y t C-x C-f a p a > a p a C-x C-s > > Now I get an error message: > Cannot write backup file; backing up in ~/.emacs.d/%backup%~ > > But there is an (empty) file "apa~", so the backup DID succeed. > > My understanding is that the root cause is the function > set-file-selinux-context in fileio.c failing with a file error when the > lsetfilecon() call fails. But it is not really an error if it fails > with errno set to ENOTSUP. A system which does support SELinux may very > well have some parts of the file tree where you can't modify the > context. Such as an NFS home directory. > > It seems to me that the case where lsetfilecon() fails with ENOTSUP > should be handled in the same way as if is_selinux_enabled() returned > false in the first place, i.e. just return without any error. Do I miss > something? > > > > In GNU Emacs 24.0.95.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.10) > of 2012-04-06 on x86-13.phx2.fedoraproject.org > Windowing system distributor `Fedora Project', version 11.0.11002000 > Configured using: > `configure '--build=3Dx86_64-redhat-linux-gnu' > '--host=3Dx86_64-redhat-linux-gnu' '--program-prefix=3D' > '--disable-dependency-tracking' '--prefix=3D/usr' '--exec-prefix=3D/usr' > '--bindir=3D/usr/bin' '--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc' > '--datadir=3D/usr/share' '--includedir=3D/usr/include' > '--libdir=3D/usr/lib64' '--libexecdir=3D/usr/libexec' > '--localstatedir=3D/var' '--sharedstatedir=3D/var/lib' > '--mandir=3D/usr/share/man' '--infodir=3D/usr/share/info' '--with-dbus' > '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' > '--with-xft' '--with-xpm' '--with-x-toolkit=3Dgtk' '--with-gpm=3Dno' > '--with-wide-int' 'build_alias=3Dx86_64-redhat-linux-gnu' > 'host_alias=3Dx86_64-redhat-linux-gnu' 'CFLAGS=3D-DMAIL_USE_LOCKF -O2 -g > -pipe -Wall -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector > --param=3Dssp-buffer-size=3D4 -m64 -mtune=3Dgeneric' 'LDFLAGS=3D-Wl,-z,r= elro '' > > Important settings: > value of $LC_ALL: nil > value of $LC_COLLATE: nil > value of $LC_CTYPE: nil > value of $LC_MESSAGES: nil > value of $LC_MONETARY: nil > value of $LC_NUMERIC: nil > value of $LC_TIME: nil > value of $LANG: sv_SE.utf8 > value of $XMODIFIERS: nil > locale-coding-system: utf-8-unix > default enable-multibyte-characters: t > > Major mode: Fundamental > > Minor modes in effect: > tooltip-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: (only . t) > > Recent input: > M-x s e t - v a r b a c k u b=20 > t C-x C-f a p a a=20 > p a C-x C-s M-x r e p o r t - e m a > > Recent messages: > For information about GNU Emacs and the GNU system, type C-h C-a. > Saving file /home/g=C3=B6ran/apa... > Cannot write backup file; backing up in ~/.emacs.d/%backup%~ > Wrote /home/g=C3=B6ran/apa > > Load-path shadows: > None found. > > Features: > (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml > mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev > gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums > mm-util mail-prsvr mail-utils cus-edit easymenu cus-start cus-load > wid-edit help-fns time-date tooltip ediff-hook vc-hooks lisp-float-type > mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register > page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock > font-lock syntax facemenu font-core frame cham georgian utf-8-lang > misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew > greek romanian slovak czech european ethiopic indian cyrillic chinese > case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs > button faces cus-face files text-properties overlay sha1 md5 base64 > format env code-pages mule custom widget hashtable-print-readable > backquote make-network-process dbusbind dynamic-setting > system-font-setting font-render-setting move-toolbar gtk x-toolkit x > multi-tty emacs) From unknown Sat Jun 21 12:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11245: 24.0.95; set-file-selinux-context fails when the filesystem doesn't support contexts Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Apr 2012 17:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11245 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11245@debbugs.gnu.org Cc: goeran@uddeborg.se Received: via spool by 11245-submit@debbugs.gnu.org id=B11245.133485702520348 (code B ref 11245); Thu, 19 Apr 2012 17:38:01 +0000 Received: (at 11245) by debbugs.gnu.org; 19 Apr 2012 17:37:05 +0000 Received: from localhost ([127.0.0.1]:42144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKvI0-0005I8-QU for submit@debbugs.gnu.org; Thu, 19 Apr 2012 13:37:05 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:60367 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKvHz-0005I2-Kl for 11245@debbugs.gnu.org; Thu, 19 Apr 2012 13:37:04 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SKvHd-0001iV-Si; Thu, 19 Apr 2012 13:36:41 -0400 From: Glenn Morris References: X-Spook: Jyllandsposten Commecen brigand SHA Ansar al-Islam Israel X-Ran: RxKv.ldHkF>:Q:s4>wG:F]TxSV*a0H6Jh>3e^cJS|ozaN0g9|a.hk~+4\.UdzgO4V\>QrA X-Hue: white X-Attribution: GM Date: Thu, 19 Apr 2012 13:36:41 -0400 In-Reply-To: (goeran@uddeborg.se's message of "Sun, 15 Apr 2012 13:27:51 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) By the way, I think this is something that should be fixed for 24.1. Maybe the actual fix is simple, thanks to the very clear report. Just change to using something like (totally untested) if (fail && errno != ENOTSUP) report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); ? From unknown Sat Jun 21 12:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11245: 24.0.95; set-file-selinux-context fails when the filesystem doesn't support contexts Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Apr 2012 17:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11245 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11245@debbugs.gnu.org Cc: goeran@uddeborg.se Received: via spool by 11245-submit@debbugs.gnu.org id=B11245.133485720820631 (code B ref 11245); Thu, 19 Apr 2012 17:41:01 +0000 Received: (at 11245) by debbugs.gnu.org; 19 Apr 2012 17:40:08 +0000 Received: from localhost ([127.0.0.1]:42148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKvKy-0005Mh-DD for submit@debbugs.gnu.org; Thu, 19 Apr 2012 13:40:08 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:60443 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKvKw-0005Ma-2C for 11245@debbugs.gnu.org; Thu, 19 Apr 2012 13:40:06 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SKvKZ-0001x3-VE; Thu, 19 Apr 2012 13:39:44 -0400 From: Glenn Morris References: X-Spook: Plame Hamas kibo Elvis world domination Rumsfeld X-Ran: #R22ZGP6{&vs)1%S~X?JNv,J32=PYWre2%)LAUQUPmn4~'vf+[:iK)@`G^l^^`R_3pB)zi X-Hue: black X-Attribution: GM Date: Thu, 19 Apr 2012 13:39:43 -0400 In-Reply-To: (Glenn Morris's message of "Thu, 19 Apr 2012 13:36:41 -0400") Message-ID: <3qty0fwrhc.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) PS as a general comment, should a failure to preserve file attributes / selinux context really be treated as an error when backing up a file? From unknown Sat Jun 21 12:30:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11245: 24.0.95; set-file-selinux-context fails when the filesystem doesn't support contexts Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Apr 2012 17:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11245 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: goeran@uddeborg.se Cc: 11245@debbugs.gnu.org Received: via spool by 11245-submit@debbugs.gnu.org id=B11245.133494300230920 (code B ref 11245); Fri, 20 Apr 2012 17:31:01 +0000 Received: (at 11245) by debbugs.gnu.org; 20 Apr 2012 17:30:02 +0000 Received: from localhost ([127.0.0.1]:44592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLHek-00082T-2Y for submit@debbugs.gnu.org; Fri, 20 Apr 2012 13:30:02 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:36195 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLHeh-00081q-W9 for 11245@debbugs.gnu.org; Fri, 20 Apr 2012 13:30:00 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SLHeF-0000u3-JZ; Fri, 20 Apr 2012 13:29:31 -0400 From: Glenn Morris References: X-Spook: Rumsfeld defense information warfare DRM morse EuroFed X-Ran: NRtX>\^1k>$|:0`Hi!4F+2sJB:p5/+6}L^X4'Lg[^P.[,,9@*F$E~&gqXu)$8T:6s%7$;} X-Hue: magenta X-Attribution: GM Date: Fri, 20 Apr 2012 13:29:31 -0400 In-Reply-To: (Glenn Morris's message of "Thu, 19 Apr 2012 13:36:41 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) I tested this patch with the scenario you describe (using backup-by-copying = t) and it works for me. I will commit it soon. *** src/fileio.c 2012-02-25 09:07:23 +0000 --- src/fileio.c 2012-04-20 17:26:15 +0000 *************** *** 2046,2052 **** { /* Set the modified context back to the file. */ fail = fsetfilecon (ofd, con); ! if (fail) report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil)); freecon (con); --- 2046,2052 ---- { /* Set the modified context back to the file. */ fail = fsetfilecon (ofd, con); ! if (fail && errno != ENOTSUP) report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil)); freecon (con); *************** *** 2920,2926 **** /* Set the modified context back to the file. */ fail = lsetfilecon (SSDATA (encoded_absname), context_str (parsed_con)); ! if (fail) report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); context_free (parsed_con); --- 2920,2926 ---- /* Set the modified context back to the file. */ fail = lsetfilecon (SSDATA (encoded_absname), context_str (parsed_con)); ! if (fail && errno != ENOTSUP) report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); context_free (parsed_con); From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 20 13:36:28 2012 Received: (at control) by debbugs.gnu.org; 20 Apr 2012 17:36:28 +0000 Received: from localhost ([127.0.0.1]:44596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLHkx-0008CN-3I for submit@debbugs.gnu.org; Fri, 20 Apr 2012 13:36:27 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:36310 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLHku-0008CF-DI for control@debbugs.gnu.org; Fri, 20 Apr 2012 13:36:24 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SLHkT-0001VO-TA for control@debbugs.gnu.org; Fri, 20 Apr 2012 13:35:58 -0400 Date: Fri, 20 Apr 2012 13:35:57 -0400 Message-Id: Subject: control message for bug 11245 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 11245 24.0.96