c - Portable method for getting ACL perms from acl_permset_t -


the posix.1e (draft) standard defines number of functions working acls (defined in sys/acl.h regardless of platform). see manpage overview of standard. 1 critical function, acl_get_perm, queries see whether acl_permset_t has particular permission (acl_permset_t meant opaque type) defined linux-specific extension. sources (see here example) suggest acl_get_perm, or non-portable variant, acl_get_perm_np, defined on other systems, though standard doesn't require it.

  • is there portable way query acl_permset_t given permission?

all of code i've found online far 1 of following:

  • skirts issue using acl_to_text function, defined in libacl, text representation of acl directly, without having inspect permissions directly (see, example, darwin's implementation of getfacl)
  • skirts issue setting permissions, not getting them (see, example, darwin's implementation of setfacl)
  • checks @ configuration time see whether 1 of acl_get_perm variants defined, , otherwise concludes posix acls not supported (see, example, darwin's bsdtar_platform.h)

none of these approaches desirable. i'd way can use posix-compliant portion of libacl query permissions myself without having rely on system-specific extensions. there way that?


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -