linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christian Göttsche" <cgzones@googlemail.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Andreas Dilger <adilger@dilger.ca>,
	SElinux list <selinux@vger.kernel.org>,
	Miklos Szeredi <mszeredi@redhat.com>,
	Linux API <linux-api@vger.kernel.org>,
	linux-man <linux-man@vger.kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] f*xattr: allow O_PATH descriptors
Date: Thu, 9 Jun 2022 11:14:45 +0200	[thread overview]
Message-ID: <CAJ2a_DdpvaXxoWKJhVww3=xGcp5n4O3LZ+n5dZMh8pUb9WZM_w@mail.gmail.com> (raw)
In-Reply-To: <CAOQ4uxh1QG_xJ0Ffh=wKksxWKm1ioazmc8SxeYYH9yHT1PMasg@mail.gmail.com>

On Thu, 9 Jun 2022 at 06:36, Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Wed, Jun 8, 2022 at 9:01 PM Andreas Dilger <adilger@dilger.ca> wrote:
> >
> > On Jun 7, 2022, at 9:31 AM, Christian Göttsche <cgzones@googlemail.com> wrote:
> > >
> > > From: Miklos Szeredi <mszeredi@redhat.com>
> > >
> > > Support file descriptors obtained via O_PATH for extended attribute
> > > operations.
> > >
> > > Extended attributes are for example used by SELinux for the security
> > > context of file objects. To avoid time-of-check-time-of-use issues while
> > > setting those contexts it is advisable to pin the file in question and
> > > operate on a file descriptor instead of the path name. This can be
> > > emulated in userspace via /proc/self/fd/NN [1] but requires a procfs,
> > > which might not be mounted e.g. inside of chroots, see[2].
> >
> > Will this allow get/set xattrs directly on symlinks?  That is one problem
> > that we have with some of the xattrs that are inherited on symlinks, but
> > there is no way to change them.  Allowing setxattr directly on a symlink
> > would be very useful.
>
> It is possible.
> See: https://github.com/libfuse/libfuse/pull/514
>

Does it really? (It should not since xtattr(7) mentions some quota
related issues.)
In my tests setting extended attributes via O_PATH on symlinks fails
with ENOTSUP (even as root), except for special ones, like
"security.selinux".

> That's why Miklos withdrew this patch:
> https://lore.kernel.org/linux-fsdevel/CAOssrKeV7g0wPg4ozspG4R7a+5qARqWdG+GxWtXB-MCfbVM=9A@mail.gmail.com/
>
> Thanks,
> Amir.

      reply	other threads:[~2022-06-09  9:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 15:31 [RFC PATCH] f*xattr: allow O_PATH descriptors Christian Göttsche
2022-06-08  5:13 ` Amir Goldstein
2022-06-08 11:27 ` Christian Brauner
2022-06-08 12:28   ` Amir Goldstein
2022-06-08 12:48     ` Christian Brauner
2022-06-08 15:12       ` Amir Goldstein
2022-06-09  8:56         ` Christian Brauner
2022-06-18  3:18         ` Aleksa Sarai
2022-06-18  9:11           ` Amir Goldstein
2022-06-18 11:19             ` Christian Göttsche
2022-06-18 15:30               ` Amir Goldstein
2022-06-20  6:07             ` Aleksa Sarai
2022-06-20  7:45               ` Amir Goldstein
2022-06-22  2:57                 ` Aleksa Sarai
2022-08-19 18:05                   ` Christian Göttsche
2022-08-19 20:27                     ` Amir Goldstein
2022-06-08 16:53 ` Andreas Dilger
2022-06-09  4:35   ` Amir Goldstein
2022-06-09  9:14     ` Christian Göttsche [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='CAJ2a_DdpvaXxoWKJhVww3=xGcp5n4O3LZ+n5dZMh8pUb9WZM_w@mail.gmail.com' \
    --to=cgzones@googlemail.com \
    --cc=adilger@dilger.ca \
    --cc=amir73il@gmail.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=selinux@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).