diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-18 17:34:05 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-18 17:34:05 -0800 |
commit | 5591fd5e034819a89ac93c0ccc6be2a930042f71 (patch) | |
tree | bf81257d2b21b5443adcdd9d0c1b191e0cb1439c /net/netlabel/netlabel_user.c | |
parent | 8ffc7dbce2d54d2ac1fac9f79a94cb84b0cba1f5 (diff) | |
parent | 8afd8c8faa24249e48f5007aee46209299377588 (diff) | |
download | linux-5591fd5e034819a89ac93c0ccc6be2a930042f71.tar.gz linux-5591fd5e034819a89ac93c0ccc6be2a930042f71.tar.bz2 linux-5591fd5e034819a89ac93c0ccc6be2a930042f71.zip |
Merge tag 'lsm-pr-20241112' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm
Pull lsm updates from Paul Moore:
"Thirteen patches, all focused on moving away from the current 'secid'
LSM identifier to a richer 'lsm_prop' structure.
This move will help reduce the translation that is necessary in many
LSMs, offering better performance, and make it easier to support
different LSMs in the future"
* tag 'lsm-pr-20241112' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
lsm: remove lsm_prop scaffolding
netlabel,smack: use lsm_prop for audit data
audit: change context data from secid to lsm_prop
lsm: create new security_cred_getlsmprop LSM hook
audit: use an lsm_prop in audit_names
lsm: use lsm_prop in security_inode_getsecid
lsm: use lsm_prop in security_current_getsecid
audit: update shutdown LSM data
lsm: use lsm_prop in security_ipc_getsecid
audit: maintain an lsm_prop in audit_context
lsm: add lsmprop_to_secctx hook
lsm: use lsm_prop in security_audit_rule_match
lsm: add the lsm_prop data structure
Diffstat (limited to 'net/netlabel/netlabel_user.c')
-rw-r--r-- | net/netlabel/netlabel_user.c | 7 |
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); } |