• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining if a volume support
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining if a volume support


  • Subject: Re: Determining if a volume support
  • From: James Peach <email@hidden>
  • Date: Mon, 18 Feb 2008 11:49:53 -0800

On Feb 18, 2008, at 11:38 AM, James Bucanek wrote:

I'm trying to determine if a volume supports access control lists (ACLs). I dug around FSGetVolInfo and FSGetVolParams and can't seem to find a bit that says "bSupportsACLs".

getattrlist(2) will tell you:

int acl_support(const char * path)
{
    struct attrlist alist;
    struct dirReplyBlock {
	unsigned long   length;
	struct vol_capabilities_attr volattr;
    } reply;
    struct statfs volstat;

    if (statfs(path, &volstat) != 0) {
	perror("statfs");
	return 0;
    }

    memset( &alist, 0, sizeof(alist));
    memset( &reply, 0, sizeof(reply));

    alist.bitmapcount = ATTR_BIT_MAP_COUNT;
    alist.volattr = ATTR_VOL_INFO | ATTR_VOL_CAPABILITIES;

    if (getattrlist(volstat.f_mntonname, &alist,
		&reply, sizeof(reply), 0) != 0) {
	perror("getattrlist");
	return 0;
    }

if (reply.volattr.valid[VOL_CAPABILITIES_INTERFACES] & VOL_CAP_INT_EXTENDED_SECURITY
&& reply.volattr.capabilities[VOL_CAPABILITIES_INTERFACES] & VOL_CAP_INT_EXTENDED_SECURITY) {
return 1;
}


    return 0;
}

_______________________________________________
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


  • Follow-Ups:
    • Re: Determining if a volume support
      • From: Quinn <email@hidden>
References: 
 >Determining if a volume support (From: James Bucanek <email@hidden>)

  • Prev by Date: Determining if a volume support
  • Next by Date: Re: Determining if a volume support
  • Previous by thread: Determining if a volume support
  • Next by thread: Re: Determining if a volume support
  • Index(es):
    • Date
    • Thread