GNU bug report logs - #11245
24.0.95; set-file-selinux-context fails when the filesystem doesn't support contexts

Previous Next

Package: emacs;

Reported by: goeran <at> uddeborg.se

Date: Sun, 15 Apr 2012 11:30:02 UTC

Severity: important

Found in version 24.0.95

Fixed in version 24.0.96

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: goeran <at> uddeborg.se
Cc: 11245 <at> debbugs.gnu.org
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
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);





This bug report was last modified 13 years and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.