From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#11245: 24.0.95; set-file-selinux-context fails when the filesystem doesn't support contexts Date: Fri, 20 Apr 2012 13:29:31 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1334943045 27279 80.91.229.3 (20 Apr 2012 17:30:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Apr 2012 17:30:45 +0000 (UTC) Cc: 11245@debbugs.gnu.org To: goeran@uddeborg.se Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 20 19:30:42 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SLHfO-0004Fu-3y for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Apr 2012 19:30:42 +0200 Original-Received: from localhost ([::1]:51423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLHfN-0004Av-Gg for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Apr 2012 13:30:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLHfK-0004Ah-St for bug-gnu-emacs@gnu.org; Fri, 20 Apr 2012 13:30:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLHfI-0004Fx-V3 for bug-gnu-emacs@gnu.org; Fri, 20 Apr 2012 13:30:38 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLHfI-0004Fp-Rs for bug-gnu-emacs@gnu.org; Fri, 20 Apr 2012 13:30:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SLHfi-00084T-1Y for bug-gnu-emacs@gnu.org; Fri, 20 Apr 2012 13:31:02 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 11245-submit@debbugs.gnu.org id=B11245.133494300230920 (code B ref 11245); Fri, 20 Apr 2012 17:31:01 +0000 Original-Received: (at 11245) by debbugs.gnu.org; 20 Apr 2012 17:30:02 +0000 Original-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 Original-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 Original-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 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 In-Reply-To: (Glenn Morris's message of "Thu, 19 Apr 2012 13:36:41 -0400") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59324 Archived-At: 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);