aboutsummaryrefslogtreecommitdiffstats
path: root/security/smack/smack.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/smack/smack.h')
-rw-r--r--security/smack/smack.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/security/smack/smack.h b/security/smack/smack.h
index ccba3823d9ef..4ede719922ed 100644
--- a/security/smack/smack.h
+++ b/security/smack/smack.h
@@ -325,6 +325,14 @@ static inline void smk_ad_init(struct smk_audit_info *a, const char *func,
325 a->a.smack_audit_data->function = func; 325 a->a.smack_audit_data->function = func;
326} 326}
327 327
328static inline void smk_ad_init_net(struct smk_audit_info *a, const char *func,
329 char type, struct lsm_network_audit *net)
330{
331 smk_ad_init(a, func, type);
332 memset(net, 0, sizeof(*net));
333 a->a.u.net = net;
334}
335
328static inline void smk_ad_setfield_u_tsk(struct smk_audit_info *a, 336static inline void smk_ad_setfield_u_tsk(struct smk_audit_info *a,
329 struct task_struct *t) 337 struct task_struct *t)
330{ 338{
@@ -348,7 +356,7 @@ static inline void smk_ad_setfield_u_fs_path(struct smk_audit_info *a,
348static inline void smk_ad_setfield_u_net_sk(struct smk_audit_info *a, 356static inline void smk_ad_setfield_u_net_sk(struct smk_audit_info *a,
349 struct sock *sk) 357 struct sock *sk)
350{ 358{
351 a->a.u.net.sk = sk; 359 a->a.u.net->sk = sk;
352} 360}
353 361
354#else /* no AUDIT */ 362#else /* no AUDIT */