AUPARSE_GET_LINE_NUMBER(3)

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

πŸ’– AUPARSE_GET_LINE_NUMBER πŸ’–

okay bestie, welcome to the auparse_get_line_number(3) page β€” yes that's the Linux Audit API, and yes we're gonna make line numbers cute. sit down, hydrate, let's go 🫢


✨ NAME ✨

auparse_get_line_number β€” get line number where record was found πŸ”


🌸 SYNOPSIS 🌸

#include <auparse.h>

unsigned int auparse_get_line_number(const auparse_state_t *au);"

(yes the trailing " is literally in there, no I will not be fixing it, that's canon πŸ’…)


πŸŽ€ DESCRIPTION πŸŽ€

so, auparse_get_line_number will return the source input line number for the current record of the current event. that's it. that's the whole job. main character behavior tbh.

line numbers start at 1. not zero. one. we're one-based around here, no cap. ✨

and here's the lil plot twist πŸ‘€ β€” if the source input type is AUSOURCE_FILE_ARRAY, the line numbering will reset back to 1 each time a new line in the file array is opened. so like, new file, new count, fresh start, it's giving rebirth era πŸ¦‹


πŸ’« RETURN VALUE πŸ’«

returns the line number. line numbers are 1 based, and a zero value indicates the line number information is unavailable. 😭

so if you get a 0, that's not "line zero", that's "we literally don't know, bestie". don't @ me, that's just how it is.

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

John Dennis β€” iconic, we stan πŸ’œ


and that's the whole page!! written by Red Hat, dated June 2016, and the original header/footer said AUPARSE_GET_LINE_NUMBER(3) twice because it's extra like that. mwah, go read your audit logs bestie πŸ’–πŸŽ€βœ¨