Re: Determining extended attribute support on a volume
Re: Determining extended attribute support on a volume
- Subject: Re: Determining extended attribute support on a volume
- From: rohan a <email@hidden>
- Date: Sat, 25 Apr 2009 16:39:56 +0530
Hi,
Actually my man pages are not showing either of VOL_CAP_INT_EXTENDED_SECURITY or VOL_CAP_INT_EXTENDED_ATTR. I use Mac OS X 10.4
However, the file /usr/include/sys/attr.h shows
#define VOL_CAP_INT_EXTENDED_SECURITY 0x00000400
but not
VOL_CAP_INT_EXTENDED_ATTR
Thanks.
On 4/25/09, Terry Lambert <email@hidden> wrote:
On Apr 24, 2009, at 11:38 PM, rohan a wrote:
Hello,
How can I determine if a volume supports extended attributes before I can actually call the functions getxattr() or setxattr()?
Read 12 lines further in the manual page for getattrlist(), until you get to two capabilities past the VOL_CAP_INT_EXTENDED_SECURITY to the VOL_CAP_INT_EXTENDED_ATTR entry.
Note that this only refers to native wupport.
Basically, if a volume doesn't support ACLs natively, then ACLs are stored in a filesect in an extended attribute. If it doesn't support extended attributes natively, then extended attributes are stored in poop files.
So worst case, you have an ACL in an extended attribute in a poop file.
There are also mount options that control whether or not the volume is going to support ACLs; by default, if it sees that the ACL attribute was turned on previously, it will turn it on when the volume is mounted, unless you remount it or ask it not to for a given mount instance, in which case it will turn them off.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden