summaryrefslogtreecommitdiff
path: root/net/netlabel/netlabel_user.c
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2024-10-09 10:32:20 -0700
committerPaul Moore <paul@paul-moore.com>2024-10-11 14:34:16 -0400
commit05a344e54d0b4892736526e4a309851da8ee9c89 (patch)
tree0ee5712316b1619172d26ac0ee76fdc9a5f4a9ee /net/netlabel/netlabel_user.c
parent13d826e564e2ccae9df0caac8a3deb40dc4c8fda (diff)
downloadlinux-05a344e54d0b4892736526e4a309851da8ee9c89.tar.gz
linux-05a344e54d0b4892736526e4a309851da8ee9c89.tar.bz2
linux-05a344e54d0b4892736526e4a309851da8ee9c89.zip
netlabel,smack: use lsm_prop for audit data
Replace the secid in the netlbl_audit structure with an lsm_prop. Remove scaffolding that was required when the value was a secid. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: fix the subject line] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'net/netlabel/netlabel_user.c')
-rw-r--r--net/netlabel/netlabel_user.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/netlabel/netlabel_user.c b/net/netlabel/netlabel_user.c
index 3ed4fea2a2de..81635a13987b 100644
--- a/net/netlabel/netlabel_user.c
+++ b/net/netlabel/netlabel_user.c
@@ -98,10 +98,9 @@ struct audit_buffer *netlbl_audit_start_common(int type,
from_kuid(&init_user_ns, audit_info->loginuid),
audit_info->sessionid);
- if (audit_info->secid != 0 &&
- security_secid_to_secctx(audit_info->secid,
- &secctx,
- &secctx_len) == 0) {
+ if (lsmprop_is_set(&audit_info->prop) &&
+ security_lsmprop_to_secctx(&audit_info->prop, &secctx,
+ &secctx_len) == 0) {
audit_log_format(audit_buf, " subj=%s", secctx);
security_release_secctx(secctx, secctx_len);
}