]> git.ipfire.org Git - thirdparty/openldap.git/commit
slapo-auditlog: Add olcAuditlogNonBlocking to avoid blocking when logging to named...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 1 Jul 2025 11:57:08 +0000 (07:57 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 3 Jul 2025 17:18:51 +0000 (11:18 -0600)
commit163da8d21762f11b10d891d39e8ff0a7b459e55b
treeb0ec358c877b79ab7eb5a702180a7f11b2a7624a
parentb6bed508f5202e01018615dce96dac06fcd8784b
slapo-auditlog: Add olcAuditlogNonBlocking to avoid blocking when logging to named pipes

The default behaviour of fopen() when called on a named pipe which does not have any reader, is to block, until a reader opens the pipe.  This blocks slapo-auditlog when it attempts to write output.  Depending on how critical the audit log  is, it may be preferable to discard audit log output and continue processing requests if there's no reader available.

For clarity the call to fopen() is removed and replaced with open()/fdopen(), allowing us to specify O_* flags as opposed to using fopen() or open()/fdopen(). 0666 are the base permissions used by fopen() when files are created.
doc/guide/admin/aspell.en.pws
doc/man/man5/slapo-auditlog.5
servers/slapd/overlays/auditlog.c
tests/scripts/test090-auditlog [new file with mode: 0755]