Lines Matching refs:ab
185 static inline void print_ipv6_addr(struct audit_buffer *ab, in print_ipv6_addr() argument
190 audit_log_format(ab, " %s=%pI6c", name1, addr); in print_ipv6_addr()
192 audit_log_format(ab, " %s=%d", name2, ntohs(port)); in print_ipv6_addr()
195 static inline void print_ipv4_addr(struct audit_buffer *ab, __be32 addr, in print_ipv4_addr() argument
199 audit_log_format(ab, " %s=%pI4", name1, &addr); in print_ipv4_addr()
201 audit_log_format(ab, " %s=%d", name2, ntohs(port)); in print_ipv4_addr()
209 static void dump_common_audit_data(struct audit_buffer *ab, in dump_common_audit_data() argument
221 audit_log_format(ab, " pid=%d comm=", task_tgid_nr(current)); in dump_common_audit_data()
222 audit_log_untrustedstring(ab, memcpy(comm, current->comm, sizeof(comm))); in dump_common_audit_data()
228 audit_log_format(ab, " key=%d ", a->u.ipc_id); in dump_common_audit_data()
231 audit_log_format(ab, " capability=%d ", a->u.cap); in dump_common_audit_data()
236 audit_log_d_path(ab, " path=", &a->u.path); in dump_common_audit_data()
240 audit_log_format(ab, " dev="); in dump_common_audit_data()
241 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data()
242 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data()
250 audit_log_d_path(ab, " path=", &a->u.file->f_path); in dump_common_audit_data()
254 audit_log_format(ab, " dev="); in dump_common_audit_data()
255 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data()
256 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data()
264 audit_log_d_path(ab, " path=", &a->u.op->path); in dump_common_audit_data()
268 audit_log_format(ab, " dev="); in dump_common_audit_data()
269 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data()
270 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data()
273 audit_log_format(ab, " ioctlcmd=0x%hx", a->u.op->cmd); in dump_common_audit_data()
280 audit_log_format(ab, " name="); in dump_common_audit_data()
282 audit_log_untrustedstring(ab, a->u.dentry->d_name.name); in dump_common_audit_data()
287 audit_log_format(ab, " dev="); in dump_common_audit_data()
288 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data()
289 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data()
301 audit_log_format(ab, " name="); in dump_common_audit_data()
303 audit_log_untrustedstring(ab, dentry->d_name.name); in dump_common_audit_data()
307 audit_log_format(ab, " dev="); in dump_common_audit_data()
308 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data()
309 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data()
319 audit_log_format(ab, " opid=%d ocomm=", pid); in dump_common_audit_data()
320 audit_log_untrustedstring(ab, in dump_common_audit_data()
338 print_ipv4_addr(ab, inet->inet_rcv_saddr, in dump_common_audit_data()
341 print_ipv4_addr(ab, inet->inet_daddr, in dump_common_audit_data()
350 print_ipv6_addr(ab, &sk->sk_v6_rcv_saddr, in dump_common_audit_data()
353 print_ipv6_addr(ab, &sk->sk_v6_daddr, in dump_common_audit_data()
365 audit_log_d_path(ab, " path=", &u->path); in dump_common_audit_data()
370 audit_log_format(ab, " path="); in dump_common_audit_data()
372 audit_log_untrustedstring(ab, p); in dump_common_audit_data()
374 audit_log_n_hex(ab, p, len); in dump_common_audit_data()
381 print_ipv4_addr(ab, a->u.net->v4info.saddr, in dump_common_audit_data()
384 print_ipv4_addr(ab, a->u.net->v4info.daddr, in dump_common_audit_data()
389 print_ipv6_addr(ab, &a->u.net->v6info.saddr, in dump_common_audit_data()
392 print_ipv6_addr(ab, &a->u.net->v6info.daddr, in dump_common_audit_data()
403 audit_log_format(ab, " netif=%s", dev->name); in dump_common_audit_data()
410 audit_log_format(ab, " key_serial=%u", a->u.key_struct.key); in dump_common_audit_data()
412 audit_log_format(ab, " key_desc="); in dump_common_audit_data()
413 audit_log_untrustedstring(ab, a->u.key_struct.key_desc); in dump_common_audit_data()
418 audit_log_format(ab, " kmod="); in dump_common_audit_data()
419 audit_log_untrustedstring(ab, a->u.kmod_name); in dump_common_audit_data()
428 audit_log_format(ab, " pkey=0x%x subnet_prefix=%pI6c", in dump_common_audit_data()
433 audit_log_format(ab, " device=%s port_num=%u", in dump_common_audit_data()
438 audit_log_format(ab, " lockdown_reason=\"%s\"", in dump_common_audit_data()
457 struct audit_buffer *ab; in common_lsm_audit() local
462 ab = audit_log_start(audit_context(), GFP_ATOMIC | __GFP_NOWARN, in common_lsm_audit()
465 if (ab == NULL) in common_lsm_audit()
469 pre_audit(ab, a); in common_lsm_audit()
471 dump_common_audit_data(ab, a); in common_lsm_audit()
474 post_audit(ab, a); in common_lsm_audit()
476 audit_log_end(ab); in common_lsm_audit()