GNU bug report logs -
#21699
24.5; Bug in backup-buffer-copy and/or set-file-extended-attributes etc
Previous Next
Reported by: Eli Barzilay <eli <at> barzilay.org>
Date: Sun, 18 Oct 2015 04:36:02 UTC
Severity: normal
Found in version 24.5
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #53 received at 21699 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 19 Oct 2015 05:10:58 -0400
> From: Eli Barzilay <eli <at> barzilay.org>
> Cc: 21699 <at> debbugs.gnu.org
>
> On Mon, Oct 19, 2015 at 4:04 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >> Date: Mon, 19 Oct 2015 03:50:04 -0400
> >> From: Eli Barzilay <eli <at> barzilay.org>
> >> Cc: 21699 <at> debbugs.gnu.org
> >>
> >> *BUT* I doubt that this is a good idea, since on a system that
> >> supports both acl and selinux-context you probably want a t result to
> >> indicate that all of the extended settings worked.
> >
> > I don't think this is true. Many (maybe most) systems support either
> > ACLs or SELinux, and for them the function will incorrectly return
> > nil.
> >
> > A better way might be to have a test of "null" attributes, and avoid
> > calling the low-level APIs when the attributes are "null". A separate
> > issue, I think.
>
> Did you have a look at my `file-extended-attributes' fix? It does just
> that: when the low-level functions return "null" (four nils in the
> selinux case), then they won't get included in the result. This frees
> `set-file-extended-attributes' to require that all settings succeed.
Yes, I've seen that. But I'm not sure that we want such a change,
because it loses some information: namely, that the failed interfaces
did fail, or, equivalently, that information about the other kinds of
attributes is not available.
I don't know if this is important, but it does change the semantics of
an interface that was already released. So I preferred a fix that
didn't involve such changes.
> And I think that there's one case where things would fail with your fix:
> a linux machine that has selinux disabled will have this as the extended
> attributes:
>
> ((acl . nil) (selinux-context . (nil nil nil nil)))
>
> and your version of `set-file-extended-attributes' would fail when both
> of these fail.
You mean, a GNU/Linux machine that supports neither ACLs nor SELinux,
I suppose. Do such machines exist, and if so, are they popular?
> With my fix, `file-extended-attributes' would just return nil in
> that case, and `set-file-extended-attributes' will succeed
> trivially.
Why should set-file-extended-attributes succeed in this case? It
didn't set any extended attributes, right? And if neither ACLs nor
SELinux is supported, we should definitely fall back on chmod for the
backup files, shouldn't we?
This bug report was last modified 3 years and 31 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.