Re: extattr namespaces

2012-03-29 Thread Bill Stouder-Studenmund
On Mon, Feb 06, 2012 at 05:04:45PM +, David Holland wrote: On Mon, Feb 06, 2012 at 09:51:19AM +, Emmanuel Dreyfus wrote: Here is public disuccsion about extended attributs namespaces, following a private request from yamt@ Which of the two models does OS X use? OS X doesn't

Re: extattr namespaces

2012-03-29 Thread Bill Stouder-Studenmund
On Mon, Feb 13, 2012 at 11:42:49AM +0100, Manuel Bouyer wrote: On Mon, Feb 13, 2012 at 10:37:25AM +, Emmanuel Dreyfus wrote: On Mon, Feb 13, 2012 at 11:27:29AM +0100, Manuel Bouyer wrote: But then, if you see USER foo.bar in the filesystem, you don't know if it should be mapped to

Re: extattr namespaces

2012-02-13 Thread YAMAMOTO Takashi
hi, The question is: do we strip/add the string namespace when storing/reading the values in the filesystem. For native use, I think we do not want to strip, as it is simplier. The i agree. problem arise when mounting a disk from FreeBSD. Here when we ask to store user.foo, we mean USER

Re: extattr namespaces

2012-02-13 Thread Manuel Bouyer
On Fri, Feb 10, 2012 at 02:01:58PM +0100, Emmanuel Dreyfus wrote: [...] I think we just need a mount option: -o -stripxattr It would do this mapping: system.foo - SYSTEM foo trusted.foo - SYSTEM trusted.foo security.foo - SYSTEM security.foo user.foo

Re: extattr namespaces

2012-02-13 Thread Emmanuel Dreyfus
On Mon, Feb 13, 2012 at 11:27:29AM +0100, Manuel Bouyer wrote: But then, if you see USER foo.bar in the filesystem, you don't know if it should be mapped to user.foo.bar or foo.bar. I don't think this can work. If the disk is from FreeBSD, you mount with -o stripxattr. When you read it, USER

Re: extattr namespaces

2012-02-13 Thread Manuel Bouyer
On Mon, Feb 13, 2012 at 10:37:25AM +, Emmanuel Dreyfus wrote: On Mon, Feb 13, 2012 at 11:27:29AM +0100, Manuel Bouyer wrote: But then, if you see USER foo.bar in the filesystem, you don't know if it should be mapped to user.foo.bar or foo.bar. I don't think this can work. If the disk

Re: extattr namespaces

2012-02-13 Thread Emmanuel Dreyfus
On Mon, Feb 13, 2012 at 11:42:49AM +0100, Manuel Bouyer wrote: And what happens if you write baz.foo.bar ? You could just error out in this case. You are right. If the purpose of -o stripxattr is to let us use a disk from FreeBSD without damages, then the option should make it impossible to

Re: extattr namespaces

2012-02-10 Thread David Holland
On Fri, Feb 10, 2012 at 09:37:30AM +, YAMAMOTO Takashi wrote: On Mon, Feb 06, 2012 at 09:51:19AM +, Emmanuel Dreyfus wrote: Here is public disuccsion about extended attributs namespaces, following a private request from yamt@ Which of the two models does OS X use?

Re: extattr namespaces

2012-02-10 Thread YAMAMOTO Takashi
hi, Manuel Bouyer bou...@antioche.eu.org wrote: I'm not sure you can even read them: on freebsd user.foo.bar will be stored as name foo.bar in (integer) namespace user. When we'll read it we'll find foo in (integer) namespace user but we don't know which namespace it really belongs to (as

Re: extattr namespaces

2012-02-10 Thread Alan Barrett
On Fri, 10 Feb 2012, YAMAMOTO Takashi wrote: how about the following mapping? xattr name string - ufs on-disk system.foo - SYSTEM foo others.bar - USER others.bar Looks reasonable, but then which of the following? a) user.user.baz - USER user.baz b)

Re: extattr namespaces

2012-02-10 Thread Emmanuel Dreyfus
Alan Barrett a...@cequrux.com wrote: how about the following mapping? xattr name string - ufs on-disk system.foo - SYSTEM foo others.bar - USER others.bar Looks reasonable, but then which of the following? a)user.user.baz - USER user.baz b)user.baz

extattr namespaces

2012-02-06 Thread Emmanuel Dreyfus
Here is public disuccsion about extended attributs namespaces, following a private request from yamt@ We ahve two extended attributes API in tree: one from FreeBSD and one from Linux. We are about to toss the FreeBSD one in favor of the Linux one. That is easy now since we never had working

Re: extattr namespaces

2012-02-06 Thread Eduardo Horvath
On Mon, 6 Feb 2012, Emmanuel Dreyfus wrote: Here is public disuccsion about extended attributs namespaces, following a private request from yamt@ We ahve two extended attributes API in tree: one from FreeBSD and one from Linux. We are about to toss the FreeBSD one in favor of the Linux

Re: extattr namespaces

2012-02-06 Thread Eric Haszlakiewicz
On Mon, Feb 06, 2012 at 04:23:34PM +, Eduardo Horvath wrote: On Mon, 6 Feb 2012, Emmanuel Dreyfus wrote: We ahve two extended attributes API in tree: one from FreeBSD and one from Linux. We are about to toss the FreeBSD one in favor of the Linux one. That is easy now since we never

Re: extattr namespaces

2012-02-06 Thread Manuel Bouyer
On Mon, Feb 06, 2012 at 09:51:19AM +, Emmanuel Dreyfus wrote: Here is public disuccsion about extended attributs namespaces, following a private request from yamt@ We ahve two extended attributes API in tree: one from FreeBSD and one from Linux. We are about to toss the FreeBSD one in

Re: extattr namespaces

2012-02-06 Thread Emmanuel Dreyfus
On Mon, Feb 06, 2012 at 05:43:10PM +0100, Manuel Bouyer wrote: note that the ffsv2 extended attribute on-disk format uses an int as namespaces (just like the API). Nothing unworkable here, but it may be tricky if we want to be compatible with FreeBSD ... We can just test the namespace in

Re: extattr namespaces

2012-02-06 Thread Manuel Bouyer
On Mon, Feb 06, 2012 at 04:47:35PM +, Emmanuel Dreyfus wrote: On Mon, Feb 06, 2012 at 05:43:10PM +0100, Manuel Bouyer wrote: note that the ffsv2 extended attribute on-disk format uses an int as namespaces (just like the API). Nothing unworkable here, but it may be tricky if we want to

Re: extattr namespaces

2012-02-06 Thread Emmanuel Dreyfus
On Mon, Feb 06, 2012 at 10:34:54AM -0600, Eric Haszlakiewicz wrote: setextattr system md5 `md5 -q /boot/kernel/kernel` /boot/kernel/kernel Note that the Linux style is already supported: setextattr system.md5 `md5 -q /boot/kernel/kernel` /boot/kernel/kernel I recall implementing it last

Re: extattr namespaces

2012-02-06 Thread Emmanuel Dreyfus
On Mon, Feb 06, 2012 at 05:53:09PM +0100, Manuel Bouyer wrote: But if you want to have system.foo distinct from security.foo, you have to duplicate the namespace in the name itself, right ? Yes, but if we want to tend forward the Linux API, this is the way to go. You cannot add abitrary user

Re: extattr namespaces

2012-02-06 Thread David Holland
On Mon, Feb 06, 2012 at 09:51:19AM +, Emmanuel Dreyfus wrote: Here is public disuccsion about extended attributs namespaces, following a private request from yamt@ Which of the two models does OS X use? -- David A. Holland dholl...@netbsd.org

Re: extattr namespaces

2012-02-06 Thread Manuel Bouyer
On Mon, Feb 06, 2012 at 05:00:05PM +, Emmanuel Dreyfus wrote: On Mon, Feb 06, 2012 at 05:53:09PM +0100, Manuel Bouyer wrote: But if you want to have system.foo distinct from security.foo, you have to duplicate the namespace in the name itself, right ? Yes, but if we want to tend

Re: extattr namespaces

2012-02-06 Thread Emmanuel Dreyfus
Manuel Bouyer bou...@antioche.eu.org wrote: I'm not sure you can even read them: on freebsd user.foo.bar will be stored as name foo.bar in (integer) namespace user. When we'll read it we'll find foo in (integer) namespace user but we don't know which namespace it really belongs to (as we

Re: extattr namespaces

2012-02-06 Thread Matthew Mondor
On Mon, 6 Feb 2012 09:51:19 + Emmanuel Dreyfus m...@netbsd.org wrote: We ahve two extended attributes API in tree: one from FreeBSD and one from Linux. We are about to toss the FreeBSD one in favor of the Linux one. That is easy now since we never had working extended attributes in a

Re: extattr namespaces

2012-02-06 Thread Emmanuel Dreyfus
Matthew Mondor mm_li...@pulsar-zone.net wrote: One thing that I'm wondering: what are the character constraints on those class names in the Linux API? As I understand, the kernel just uses C strings. Encoding is userland's tools business. For performance and security, integers make more

Re: extattr namespaces

2012-02-06 Thread Mouse
One thing that I'm wondering: what are the character constraints on those class names in the Linux API? The reason is that if UTF8 is allowed, it'd be possible for two names to show as an equivalent representation to humans, while they'd be different for the system, [...] Only if userland