AUPARSE_SET_ESCAPE_MODE(3)

πŸ“¦
version 4.2.1 Β· 2 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, fedora 43, fedora 44, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’– auparse_set_escape_mode β€” choose escape method πŸ’–

okay bestie, welcome to the auparse_set_escape_mode page from the Linux Audit API, section 3 of your friendly neighborhood manual. this one is short and sweet but it matters SO much for how your interpreted text comes out the other side. let's get into it 🫢


✨ SYNOPSIS ✨

#include <auparse.h>

void auparse_set_escape_mode(auparse_state_t *au,auparse_esc_t"mode);"

🌸 DESCRIPTION 🌸

so like, auparse_set_escape_mode is the function you call to pick which escaping method gets used when the library outputs interpreted text. it's giving "vibe check for your output," no cap. the choices for the mode variable are:

  • AUPARSE_ESC_RAW β€” literally no escaping of any kind. zero. none. raw as it gets πŸ’€
  • AUPARSE_ESC_TTY β€” escapes TTY control characters so they're harmless to display on a terminal. when any control character shows up, it gets displayed as octal numbers. this is the default mode that the auparse library is initialized with, so if you don't touch anything, this is what you get πŸ‘‘
  • AUPARSE_ESC_SHELL β€” besides escaping control characters, this one also escapes some characters that can cause problems when you're doing shell scripting. escaped control characters get displayed as octal numbers, and the other escaped characters get proceeded with a backslash. the extra characters it escapes are: ", ', `, $, \
  • AUPARSE_ESC_SHELL_QUOTE β€” similar to AUPARSE_ESC_SHELL but it expands the character set to include shell operators. escaped control characters are displayed as octal numbers, other escaped characters are proceeded with a backslash, and the additional characters it escapes include: ;, ', ", `, #, $, &, *, ?, [, ], <, >, {, }, \
bestie note: the mode you pick here is the whole personality of your output. AUPARSE_ESC_TTY is the one you get for free, so don't be surprised when that's what you're working with unless you change it πŸ’…

πŸŽ€ RETURN VALUE πŸŽ€

None β€” she returns nothing, she just does the thing. iconic behavior honestly ✨


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’œ AUTHOR πŸ’œ

Steve Grubb


and that's the whole page, bestie! Red Hat, July 2016, section 3 of the Linux Audit API β€” go forth and escape responsibly πŸ«ΆπŸ’–βœ¨