git: 0a3363814a00 - stable/15 - audit_warn: Avoid pointless fork and path search
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 05 Nov 2026 15:12:19 UTC
The branch stable/15 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=0a3363814a00c6cee6a96cedbc41090fa74b9888
commit 0a3363814a00c6cee6a96cedbc41090fa74b9888
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-05 15:11:52 +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
(cherry picked from commit 173268f3d5ede5f55a25f684d4c8c4c43749fde7)
---
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