@@ -97,7 +97,7 @@ struct calipso_doi;
/* NetLabel audit information */
struct netlbl_audit {
- u32 secid;
+ struct lsmblob lsmblob;
kuid_t loginuid;
unsigned int sessionid;
};
@@ -1529,13 +1529,11 @@ int __init netlbl_unlabel_defconf(void)
int ret_val;
struct netlbl_dom_map *entry;
struct netlbl_audit audit_info;
- struct lsmblob blob;
/* Only the kernel is allowed to call this function and the only time
* it is called is at bootup before the audit subsystem is reporting
* messages so don't worry to much about these values. */
- security_current_getsecid_subj(&blob);
- audit_info.secid = lsmblob_first(&blob);
+ security_current_getsecid_subj(&audit_info.lsmblob);
audit_info.loginuid = GLOBAL_ROOT_UID;
audit_info.sessionid = 0;
@@ -84,7 +84,6 @@ struct audit_buffer *netlbl_audit_start_common(int type,
struct netlbl_audit *audit_info)
{
struct audit_buffer *audit_buf;
- struct lsmblob blob;
if (audit_enabled == AUDIT_OFF)
return NULL;
@@ -97,8 +96,7 @@ struct audit_buffer *netlbl_audit_start_common(int type,
from_kuid(&init_user_ns, audit_info->loginuid),
audit_info->sessionid);
- lsmblob_init(&blob, audit_info->secid);
- audit_log_subject_context(audit_buf, &blob);
+ audit_log_subject_context(audit_buf, &audit_info->lsmblob);
return audit_buf;
}
@@ -32,11 +32,7 @@
*/
static inline void netlbl_netlink_auditinfo(struct netlbl_audit *audit_info)
{
- struct lsmblob blob;
-
- security_current_getsecid_subj(&blob);
- /* scaffolding until secid is converted */
- audit_info->secid = lsmblob_first(&blob);
+ security_current_getsecid_subj(&audit_info->lsmblob);
audit_info->loginuid = audit_get_loginuid(current);
audit_info->sessionid = audit_get_sessionid(current);
}
@@ -186,7 +186,7 @@ static void smk_netlabel_audit_set(struct netlbl_audit *nap)
nap->loginuid = audit_get_loginuid(current);
nap->sessionid = audit_get_sessionid(current);
- nap->secid = skp->smk_secid;
+ nap->lsmblob.secid[smack_lsmid.slot] = skp->smk_secid;
}
/*