EXPLAIN_ACL_SET_FILE_OR_DIE(3)

πŸ“¦
version 1.4.D001 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute

πŸ’– explain_acl_set_file_or_die πŸ’–

okay bestie, welcome to the manual page for explain_acl_set_file_or_die(3) β€” yes that's the real name, it's a whole mouthful, and it lives in the Library Functions Manual section of your man pages. it's giving "long function name, tiny job," and honestly? we love that for it. πŸ’…


✨ NAME ✨

explain_acl_set_file_or_die β€” set an ACL by filename and report errors


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libexplain/acl_set_file.h>

void explain_acl_set_file_or_die(const char *pathname, acl_type_t type,
        acl_t acl);

int explain_acl_set_file_on_error(const char *pathname, acl_type_t type,
        acl_t acl);

🌸 DESCRIPTION 🌸

so here's the tea, bestie. πŸ“

The explain_acl_set_file_or_die function is used to call the acl_set_file(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_acl_set_file(3) function, and then the process terminates by calling exit(EXIT_FAILURE).

πŸ’€ read that again: on failure it does NOT come back. it prints the explanation and then straight-up exit(EXIT_FAILURE)s your whole program. main character energy, but make it fatal.

The explain_acl_set_file_on_error function is used to call the acl_set_file(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_acl_set_file(3) function, but still returns to the caller.

🫢 this one is the chill sibling β€” it still tells you what went wrong, but it lets you keep living your life.

the arguments (they're literally just passed straight through, no cap)

  • pathname β€” The pathname, exactly as to be passed to the acl_set_file(3) system call.
  • type β€” The type, exactly as to be passed to the acl_set_file(3) system call.
  • acl β€” The acl, exactly as to be passed to the acl_set_file(3) system call.

πŸ‘‘ RETURN VALUE πŸ‘‘

The explain_acl_set_file_or_die function only returns on success, see acl_set_file(3) for more information. On failure, prints an explanation and exits, it does not return.

😭 "does not return" is not a vibe, it's a fact. don't write code after it expecting to wake up there.

The explain_acl_set_file_on_error function always returns the value return by the wrapped acl_set_file(3) system call.


🌈 EXAMPLE 🌈

The explain_acl_set_file_or_die function is intended to be used in a fashion similar to the following example:

explain_acl_set_file_or_die(pathname, type, acl);

that's it. that's the whole example. iconic, honestly. ✨


πŸŽ€ SEE ALSO πŸŽ€


libexplain version 1.4 Copyright (C) 2013 Peter Miller


and that's the page, bestie!! 🧚 you made it to the end, so here's your cute lil sign-off: this was explain_ac...file_or_die(3), brought to you by libexplain version 1.4, with copyright vibes from 2013 Peter Miller. now go set those ACLs responsibly, or at least with a really good error message. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from