aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_selinux
diff options
context:
space:
mode:
authorSteve Grubb <sgrubb@redhat.com>2023-08-04 17:45:45 -0400
committerDmitry V. Levin <ldv@strace.io>2023-08-04 21:45:45 +0000
commit1648734a69c31e9ce834da70144ac9a453296807 (patch)
treebdb4dbcef8ffc01505fce11d1dcf30fa78c82588 /modules/pam_selinux
parentc85513220c1bd3150e39c6277422d29cfa44acc7 (diff)
downloadpam-1648734a69c31e9ce834da70144ac9a453296807.tar.gz
pam-1648734a69c31e9ce834da70144ac9a453296807.tar.bz2
pam-1648734a69c31e9ce834da70144ac9a453296807.zip
pam_selinux: fix formatting of audit messages
pam_selinux uses audit_log_user_message to write to the audit system. It does not take an op argument, so you have to add one yourself. Otherwise the pam_selinux part of the message is lost because it's not in key=value format.
Diffstat (limited to 'modules/pam_selinux')
-rw-r--r--modules/pam_selinux/pam_selinux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_selinux/pam_selinux.c b/modules/pam_selinux/pam_selinux.c
index e52e0fc4..713b3f73 100644
--- a/modules/pam_selinux/pam_selinux.c
+++ b/modules/pam_selinux/pam_selinux.c
@@ -97,7 +97,7 @@ send_audit_message(const pam_handle_t *pamh, int success, const char *default_co
pam_syslog(pamh, LOG_ERR, "Error translating selected context '%s'.", selected_context);
selected_raw = NULL;
}
- if (asprintf(&msg, "pam: default-context=%s selected-context=%s",
+ if (asprintf(&msg, "op=pam_selinux default-context=%s selected-context=%s",
default_raw ? default_raw : (default_context ? default_context : "?"),
selected_raw ? selected_raw : (selected_context ? selected_context : "?")) < 0) {
msg = NULL; /* asprintf leaves msg in undefined state on failure */