AUPARSE_GET_LINE_NUMBER(3)
π 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 π
auparse_get_filename(3)β for when you need the where too πΊοΈauparse_next_record(3)β for when you're ready to move on, periodt
π 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 ππβ¨
π¦ where this page comes from
- alpine 3.23: audit-doc 4.1.2-r2 Β· LGPL-2.1-or-later
- alpine 3.24: audit-doc 4.1.2-r6 Β· LGPL-2.1-or-later
- arch rolling: audit 4.2.1-1 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- centos-stream 10: audit-libs-devel 4.2.1-3.el10 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.1.1-2.fc43 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.1.1-2.fc43 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.2.1-1.fc43 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.2.1-1.fc43 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.1.4-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.1.4-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.2.1-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.2.1-1.fc44 Β· LGPL-2.0-or-later
- nixpkgs unstable: audit 4.2.1
- ubuntu resolute: libauparse-dev 1:4.1.2-1build1 Β· GPL-2.0-only
- ubuntu resolute: libauparse-dev 1:4.1.2-1ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: libauparse-dev 1:4.1.2-1ubuntu1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms