From: Andreas Gruenbacher <agruen@suse.de>
To: Luka Renko <luka.renko@hermes.si>, Dave Kleikamp <shaggy@austin.ibm.com>
Cc: acl-devel@bestbits.at, linux-fsdevel@vger.kernel.org
Subject: Re: JFS extended attributes and ACLs - New Patches
Date: Thu, 12 Sep 2002 17:13:56 +0200 [thread overview]
Message-ID: <200209121713.44897.agruen@suse.de> (raw)
In-Reply-To: <FED7EB450413D511ABC100B0D021173206FDA694@hal9000.hermes.si>
On Tuesday 10 September 2002 09:40, Luka Renko wrote:
> On Monday 09 September 2002 10:02, Andreas Gruenbacher wrote:
> > Extended user attributes should be allowed only for regular files and
> > for directories with the sticky bet cleared. Rationale: See the
> > attr(5) manual page.
>
> Hmm. If different policies are to be applied to the different
> namespaces, I think it would be a good thing to move that
> policy to the
> vfs layer, rather than have each filesystem redundantly enforce these
> policies.
>
> If the VFS is requesting that an extended attribute be set, the
> filesystem-specific code should be able to assume it's allowed. I've
> tried to keep the JFS code simple. It really doesn't care and doesn't
> want to care about namespaces. I've special cased the setting of acl's
> to make sure the permissions get set correctly, but I'd prefer this
> happened at a higher level as well.
> I think that is the right solution. FS should not care about namespaces
> and potential limitations they should just provide storage for EA.
>From a filesystem point of view I can understand this position. From the VFS
point of view this doesn't make too much sense though: For each namespace
there are at least three kinds of limitations: Policy/permissions,
restrictions on the valid values, and storage related limitations.
Filesystems may support different namespaces, and within namespaces like
`system', different attributes with individual restrictions.
If we implement the policy in the VFS, then the VFS would have to know about
all possible kinds of namespaces and attributes, and about their generic
limitations, while the file systems would still need to check for their
specific limitations (i.e., some tasks would have to be done twice). The
current interface (the xattr VFS operations) wouldn't fit.
Some filesystems (e.g., XFS) have legacy support for things like ACLs with
their own specific limitations. JFS apparently has some sort of legacy
extended attributes (the OS/2 stuff that's mentioned in the patch), NTFS has
very different Windows type ACLs. ACLs will start to differ from each other
once additional features are implemented. Some file systems will find it easy
to support additions/extensions, while others may find it more difficult or
impossible. There are many examples why enforcing a common policy doesn't
make a lot of sense at the moment.
Note that the VFS also doesn't enforce the permission scheme filesystems
implement, but only has a mechanism to test if a certain type of access is
allowed. Extended attributes are not used in the kernel outside the file
systems, except for kernel nfsd, which is a notorious exception from many
rules anyway.
> I anyway do not like the fact that EA functionality is limited for
> different types of files.
> If the only limitation is quata system, then we may just have a additional
> mount option to support EA on any file type - this way user can select what
> they want to have (strict quota or EA on special files and symbolic links).
Roughly the current xattr interface is defined like this (a more detailed
description is found in the attr(5) manual page): There are different
namespaces. Each namespace determines the rules for accessing the xatts in
this namespace; the rules are consistent inside the namespace.
Currently the `user' and `system' namespaces are defined. `User' means
permissions to xattrs are similar to permissions for file contents. `System'
means there are specific limitations depending on the full attribute name
(i.e., the rules for `system.posix_acl_*' will likely differ from
`system.posix_capabilities', etc.).
If you take this as the definition, Extended User Attributes (`user'
namespace) make no sense for device special files, symlinks, or for sticky
directories. For these, file permissions work too differently from the usual
case, so the usual permissions used on UNIX systems would lead to peculiar
`user.*' permissions. (Which sysadmin would expect user xattrs of /dev/null
to be the cause for a full disk?)
The reasoning in the attr(5) manual page is terse, because a verbose
description didn't seem to make much sense there. If you want more
information/discussion on this issue you are invited to ask, or contact
Nathan Scott <nathans@sgi.com> who was also involved in thinking out the
rules.
Cheers, Andreas.
------------------------------------------------------------------
Andreas Gruenbacher SuSE Linux AG
mailto:agruen@suse.de Deutschherrnstr. 15-19
http://www.suse.de/ D-90429 Nuernberg, Germany
next prev parent reply other threads:[~2002-09-12 15:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-10 7:40 JFS extended attributes and ACLs - New Patches Luka Renko
2002-09-12 15:13 ` Andreas Gruenbacher [this message]
2002-09-12 16:16 ` Dave Kleikamp
2002-09-12 17:04 ` Andreas Gruenbacher
2002-09-12 17:34 ` Dave Kleikamp
2002-09-13 5:06 ` Nathan Scott
2002-09-13 9:27 ` Andreas Gruenbacher
2002-09-13 12:18 ` Dave Kleikamp
2002-09-13 13:20 ` [Acl-Devel] " Andreas Gruenbacher
2002-09-13 13:33 ` Dave Kleikamp
2002-09-13 9:32 ` Andreas Gruenbacher
[not found] <Pine.LNX.4.33.0209061703200.26258-100000@wotan.suse.de>
[not found] ` <200209061718.59114.agruen@suse.de>
2002-09-09 14:58 ` Dave Kleikamp
2002-09-09 15:02 ` Andreas Gruenbacher
2002-09-09 15:28 ` Dave Kleikamp
2002-09-09 15:30 ` Dave Kleikamp
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=200209121713.44897.agruen@suse.de \
--to=agruen@suse.de \
--cc=acl-devel@bestbits.at \
--cc=linux-fsdevel@vger.kernel.org \
--cc=luka.renko@hermes.si \
--cc=shaggy@austin.ibm.com \
/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