From: Glenn Morris <rgm@gnu.org>
To: goeran@uddeborg.se
Cc: 11245@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 [thread overview]
Message-ID: <rj397ynwg4.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <aq4nsfhbdi.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 19 Apr 2012 13:36:41 -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);
prev parent reply other threads:[~2012-04-20 17:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-15 11:27 bug#11245: 24.0.95; set-file-selinux-context fails when the filesystem doesn't support contexts goeran
2012-04-16 17:51 ` Glenn Morris
2012-04-19 17:36 ` Glenn Morris
2012-04-19 17:39 ` Glenn Morris
2012-04-20 17:29 ` Glenn Morris [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rj397ynwg4.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=11245@debbugs.gnu.org \
--cc=goeran@uddeborg.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.