git: 173268f3d5ed - main - audit_warn: Avoid pointless fork and path search

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Wed, 04 Nov 2026 15:33:58 UTC
The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=173268f3d5ede5f55a25f684d4c8c4c43749fde7

commit 173268f3d5ede5f55a25f684d4c8c4c43749fde7
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-11-04 15:32:28 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-11-04 15:32:28 +0000

    audit_warn: Avoid pointless fork and path search
    
    While here, document what the script actually does, not what it once did
    on a project branch somewhere that was never merged.
    
    MFC after:      1 week
    Sponsored by:   Klara, Inc.
    Sponsored by:   Qualys, Inc.
    Reviewed by:    allanjude
    Differential Revision:  https://reviews.freebsd.org/D60171
---
 contrib/openbsm/etc/audit_warn   |  3 +--
 contrib/openbsm/man/audit_warn.5 | 11 +++++------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/contrib/openbsm/etc/audit_warn b/contrib/openbsm/etc/audit_warn
index 8feb0fa4954f..e9d015c32eea 100644
--- a/contrib/openbsm/etc/audit_warn
+++ b/contrib/openbsm/etc/audit_warn
@@ -1,3 +1,2 @@
 #!/bin/sh
-
-logger -p security.warning "audit warning: $@"
+exec /usr/bin/logger -p security.warning "audit warning: $@"
diff --git a/contrib/openbsm/man/audit_warn.5 b/contrib/openbsm/man/audit_warn.5
index 8734b37b2560..6db1d20334d0 100644
--- a/contrib/openbsm/man/audit_warn.5
+++ b/contrib/openbsm/man/audit_warn.5
@@ -25,7 +25,7 @@
 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 17, 2004
+.Dd September 30, 2026
 .Dt AUDIT_WARN 5
 .Os
 .Sh NAME
@@ -41,19 +41,18 @@ generates warning messages.
 .Pp
 The default
 .Nm
-is a script whose first parameter is the type of warning; the script
-appends its arguments to
-.Pa /etc/security/audit_messages .
+is a script which passes its arguments on to
+.Xr logger 1 .
 Administrators may replace this script: a more comprehensive one would take
 different actions based on the type of warning.
 For example, a low-space warning
 could result in an email message being sent to the administrator.
 .Sh FILES
-.Bl -tag -width ".Pa /etc/security/audit_messages" -compact
+.Bl -tag -width "/etc/security/audit_warn" -compact
 .It Pa /etc/security/audit_warn
-.It Pa /etc/security/audit_messages
 .El
 .Sh SEE ALSO
+.Xr logger 1 ,
 .Xr audit 4 ,
 .Xr auditd 8
 .Sh HISTORY