mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tridge@samba.org
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: aia21@cantab.net, samba-technical@lists.samba.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-ntfs-dev@lists.sourceforge.net,
	hirofumi@mail.parknet.co.jp, sfrench@samba.org,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: FAT, NTFS, CIFS and DOS attributes
Date: Tue, 4 Jan 2005 13:49:22 +1100	[thread overview]
Message-ID: <16858.1074.740440.917427@samba.org> (raw)
In-Reply-To: <AA7F1C76-5DF7-11D9-B689-000393ACC76E@mac.com>

Kyle,

 > IMHO, it would be really nice (Although I realize this would be a
 > humongous task) if there was a "Linux" ACL system supported by the
 > VFS that is backwards compatible with UNIX perms, POSIX ACLs, and
 > NTFS ACLs

The problem is that apps/users that care about posix ACLs and NT ACLs
tend to care about them being _exactly_ right, so half baked mappings
between the different systems don't really help much. We have learnt
this the hard way in Samba3, where we attempt to map NT ACLs to posix
ACLs on the fly, and we get a never ending stream of bug reports that
NT ACLs aren't working as expected for windows users. Thats why I
stuck the full NT ACL in an xattr for Samba4.

The plan for mapping between the systems in Samba4 goes like this:

 - when a NT ACL is needed for access control, or the client asks for
   the ACL via a query file info call, smbd first looks in the NTACL
   xattr. If it finds it then all is well with the world.

 - if the NTACL xattr isn't there, then it produces one using an
   approximate mapping. The mapping for mode_t is in the function
   pvfs_default_acl() in pvfs_acl.c. The mapping when there is an
   existing posix ACL isn't done yet (we have a mapping for that in
   Samba3, but it will be a bit different in Samba4).

 - if its a file/directory create, then it also obeys the inheritance
   rules, pulling the NTACL from the parent using the above method
   then applying to the child.

I also plan to catch the posix ACL set call in the Samba LSM module,
and wipe the NTACL when that happens. In that case the NTACL will be
overridden by the new posix ACL.

Similarly, when a posix application asks to read the posix ACL, then a
reverse mapping would be supplied if there is a current NT ACL on the
file.

The important thing is that if your file access is either only from
unix apps that know about posix ACLs or only from windows apps that
know about NT ACLs, then you need to provide perfect lossless storage
of those native ACLs for those applications. It is only when you get a
transition from one scheme to the other on the one file that a mapping
should happen.

Cheers, Tridge

  reply	other threads:[~2005-01-04  2:51 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-03 22:24 H. Peter Anvin
2005-01-03 23:26 ` Michael B Allen
2005-01-03 23:33   ` H. Peter Anvin
2005-01-03 23:48     ` Michael B Allen
2005-01-03 23:55       ` H. Peter Anvin
2005-01-04  0:18     ` tridge
2005-01-04  0:24       ` H. Peter Anvin
2005-01-04  0:39         ` tridge
2005-01-04  0:57           ` H. Peter Anvin
2005-01-04  1:12             ` tridge
2005-01-04  1:31         ` Nicholas Miell
2005-01-04  1:48           ` H. Peter Anvin
2005-01-04  2:05             ` Nicholas Miell
2005-01-04 22:24       ` [Linux-NTFS-Dev] " Szakacsits Szabolcs
2005-01-04  1:21   ` tridge
2005-01-04  1:30     ` H. Peter Anvin
2005-01-03 23:28 ` Nicholas Miell
2005-01-04  0:05 ` tridge
2005-01-04  0:30   ` H. Peter Anvin
2005-01-04  0:58     ` tridge
2005-01-04  1:14       ` H. Peter Anvin
2005-01-04  1:36         ` tridge
2005-01-04  1:50           ` H. Peter Anvin
2005-01-04  2:05             ` tridge
2005-01-04  2:09               ` H. Peter Anvin
2005-01-04  2:23               ` Kyle Moffett
2005-01-04  2:49                 ` tridge [this message]
2005-01-04  3:39                   ` Kyle Moffett
2005-01-04  3:56                     ` tridge
2005-01-04  4:50                       ` Kyle Moffett
2005-01-04  4:05     ` Michael B Allen
2005-01-04 10:34 ` Anton Altaparmakov
2005-01-04 11:08   ` Anton Altaparmakov
2005-01-04 22:18   ` Nicholas Miell
2005-01-04 23:04     ` Anton Altaparmakov
2005-01-05  0:48       ` Nicholas Miell
2005-01-05  1:12         ` Nicholas Miell

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=16858.1074.740440.917427@samba.org \
    --to=tridge@samba.org \
    --cc=aia21@cantab.net \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=mrmacman_g4@mac.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    /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

all inboxes | Powered by JetHome®