bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11245: 24.0.95; set-file-selinux-context fails when the filesystem d


From: Glenn Morris
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
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

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);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]