GFS_ACL_EQUIV_MODE(3)

πŸ’– GFS_ACL_EQUIV_MODE(3) πŸ’–

okay bestie, gather round, because we're about to talk about gfs_acl_equiv_mode β€” a function from the Gfarm manual, section 3. it checks for an equivalent Gfarm ACL. that's the whole vibe. let's get into it ✨


🌸 NAME 🌸

gfs_acl_equiv_mode β€” check for an equivalent Gfarm ACL

like, it peeks at your ACL and is like "hmm, does this map cleanly onto regular mode bits?" and then tells you. iconic behavior honestly πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <gfarm/gfarm.h>

gfarm_error_t gfs_acl_equiv_mode(gfarm_acl_t acl, gfarm_mode_t *mode_p,
                                 int *is_not_equiv_p);

look at her. three arguments. no notes. 🫢


πŸ¦‹ INPUT ARGUMENTS πŸ¦‹

  • acl β€” an ACL structure type. this is the ACL we're doing the vibe check on, bestie.
  • mode_p β€” okay so if the pointer mode_p is not NULL, then the value that mode_p points to gets set to the value that defines the same owner/group/other permissions as the ones contained in the ACL. like it translates the ACL energy into classic mode bits. lowkey magical.
  • is_not_equiv_p β€” and if the pointer is_not_equiv_p is not NULL, the value it points to gets set to either 0 or 1:
    • 0 β†’ the acl is an equivalent ACL
    • 1 β†’ the acl is not an equivalent ACL

so it's giving yes/no but in integer form. classic. 😌


✨ RETURN VALUES ✨

  • GFARM_ERR_NO_ERROR β€” the function terminated successfully. we love a clean exit, no cap. πŸŽ‰
  • Others β€” an error happened that isn't the one above. the reason is shown by gfarm_error_string(3). so if something goes sideways, go ask gfarm_error_string(3) what's up. she'll explain. 😭

πŸ’œ SEE ALSO πŸ’œ


ngl bestie, the whole point here is: hand it an ACL, and it'll tell you whether that ACL is equivalent to plain mode bits, and optionally hand you those bits. simple. elegant. slay. πŸ’…βœ¨

Gfarm Β· 14 Feb 2011 Β· GFS_ACL_EQUIV_MODE(3) β€” and that's the whole page, mwah, go forth and ACL responsibly πŸ’–πŸŽ€πŸ¦‹πŸŒΈ