How do you get group/user info from file ACLs?

Documentation is sparse on this and it doesn't help that Apple's version differs from POSIX.

I know to specify ACL_TYPE_EXTENDED for acl_get_file() and know how to cycle through entries. From what I can tell, the tag is either ALLOW or DENY and you can check the permset for which actions the tag applies to.

I can't figure out how get the group or user the entry applies to. The only way I've been able to get this info is by using acl_to_text and scraping that output. Anyone know how to do this using the acl APIs?

I can't figure out how get the group or user the entry applies to. The only way I've been able to get this info is by using acl_to_text and scraping that output. Anyone know how to do this using the acl APIs?

Unfortunately, I don't think there is a good way to do this. You can see how ls does this by looking at "printacl" inside the "ls" commands source, which shows the entire process of converting the value returned by acl_get_qualifier into a readable value. The problem is that "mbr_identifier_translate" is SPI and I'm not aware of a public alternative.

Please file a bug on this and the post the bug number back here, as this really shouldn't require SPI or text parsing.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

How do you get group/user info from file ACLs?
 
 
Q