AUDIT_CLOSE(3)
π AUDIT_CLOSE π
okay bestie, welcome to the Linux Audit API corner of the manual, section 3 β yes this is AUDIT_CLOSE(3), we're doing the whole thing, sit down, hydrate, let's go π«Ά
β¨ NAME β¨
audit_close β close the audit netlink socket connection π
like... it's the goodbye function. the "ok we're done here" function. the closing the door behind you function. periodt.
πΈ SYNOPSIS πΈ
#include <libaudit.h>
void audit_close(int fd);
she's short, she's simple, she takes one int and returns nothing. iconic behaviour honestly π
π¦ DESCRIPTION π¦
okay so. audit_close() closes the NETLINK_AUDIT socket β that's the socket that does the talking with the kernel part of the Linux Audit Subsystem. it's the little phone line between your program and the kernel's audit machinery, and this function is you hanging up the phone ππ
and important: fd must have been returned by audit_open(3). like, don't just hand her any random file descriptor you found lying around. she needs that one. the one audit_open(3) gave you. no substitutions, no swaps, no "eh close enough" π
lowkey this is the partner function to audit_open(3) β you open, you do your thing, you close. the full circle moment. the character arc. we love to see it β¨
π RETURN VALUE π
None.
that's it. that's the whole section. she returns nothing. no error code, no success code, no little nod of approval. void is void, bestie π€·βοΈπ
π SEE ALSO π
audit_open(3)β the one who starts it all, the main character, the opener π₯netlink(7)β the netlink lore, if you wanna go deeper π
π AUTHOR π
Steve Grubb β thank you for your service, king π«‘π
and that's the whole page!! Red Hat put this out back in Apr 2021, and it's been living rent-free in section 3 of the Linux Audit API ever since πβ go close those sockets responsibly, bestie, ily, mwah ππΈ
π¦ where this page comes from
- alpine 3.22: audit-doc 4.0.3-r0 Β· LGPL-2.1-or-later
- 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
- centos-stream 9: audit-libs-devel 3.1.5-9.el9 Β· LGPLv2+
- centos-stream 9: audit-libs-devel 3.1.5-9.el9 Β· LGPLv2+
- debian bookworm: libaudit-dev 1:3.0.9-1 Β· GPL-2.0-only
- debian trixie: libaudit-dev 1:4.0.2-2+deb13u1 Β· GPL-2.0-only
- 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
- opensuse-leap 16.0: audit-devel 4.0-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: audit-devel 4.0-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: audit-devel 4.0-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: audit-devel 4.0-160000.2.2 Β· LGPL-2.1-or-later
- ubuntu jammy: libaudit-dev 1:3.0.7-1build1 Β· GPL-2.0-only
- ubuntu jammy: libaudit-dev 1:3.0.7-1ubuntu0.1 Β· GPL-2.0-only
- ubuntu noble: libaudit-dev 1:3.1.2-2.1build1 Β· GPL-2.0-only
- ubuntu noble: libaudit-dev 1:3.1.2-2.1ubuntu0.1 Β· GPL-2.0-only
- ubuntu questing: libaudit-dev 1:4.0.5-1build1
- ubuntu resolute: libaudit-dev 1:4.1.2-1build1 Β· GPL-2.0-only
- ubuntu resolute: libaudit-dev 1:4.1.2-1ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: libaudit-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