Re: Determining if a volume support
Re: Determining if a volume support
- Subject: Re: Determining if a volume support
- From: James Bucanek <email@hidden>
- Date: Tue, 19 Feb 2008 12:17:09 -0700
Jim Luther <mailto:email@hidden> wrote (Tuesday, February
19, 2008 10:51 AM -0800):
When bSupportsExtendedFileSecurity is set for a volume, you can use
FSGetCatalogInfo and ask for the kFSCatInfoFSFileSecurityRef info and
you may (or may not if there isn't an ACL for the item) get a
FSFileSecurityRef when you ask for it. When
bSupportsExtendedFileSecurity is clear for a volume, asking for
kFSCatInfoFSFileSecurityRef will always return NULL for the
FSFileSecurityRef.
Thanks, Jim. I actually already knew that, but that wasn't my
main problem. (I noticed that you state later that getting
kFSCatInfoFSFileSecurityRef is the second most expensive
operation, but I'm assuming that only applies to volumes that
support ACLs.)
The bug I was trying to fix was this: If I get the ACL on a
filesystem that supports them, that call always returns an ACL
definition record (typically empty). If I then try to set that
ACL description on a filesystem that doesn't support ACLs, the
FSSetCatalogInfo call fails. I want to avoid that by knowing
ahead of time that volume doesn't support ACLs.
* Note: Some catalog information is more expensive to get than others.
For performance reasons, your code should only ask for what it really
needs (don't ask for kFSCatInfoGettableInfo unless you REALLY need it).
An excellent guide to the relative cost of information! I'm
putting your message in my "keeper" mailbox.
Thank you,
James
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden