Lines Matching full:ab

172 static inline void print_ipv6_addr(struct audit_buffer *ab,  in print_ipv6_addr()  argument
177 audit_log_format(ab, " %s=%pI6c", name1, addr); in print_ipv6_addr()
179 audit_log_format(ab, " %s=%d", name2, ntohs(port)); in print_ipv6_addr()
182 static inline void print_ipv4_addr(struct audit_buffer *ab, __be32 addr, in print_ipv4_addr() argument
186 audit_log_format(ab, " %s=%pI4", name1, &addr); in print_ipv4_addr()
188 audit_log_format(ab, " %s=%d", name2, ntohs(port)); in print_ipv4_addr()
196 static void dump_common_audit_data(struct audit_buffer *ab, in dump_common_audit_data() argument
208 audit_log_format(ab, " pid=%d comm=", task_tgid_nr(current)); in dump_common_audit_data()
209 audit_log_untrustedstring(ab, memcpy(comm, current->comm, sizeof(comm))); in dump_common_audit_data()
215 audit_log_format(ab, " ipc_key=%d ", a->u.ipc_id); in dump_common_audit_data()
218 audit_log_format(ab, " capability=%d ", a->u.cap); in dump_common_audit_data()
223 audit_log_d_path(ab, " path=", &a->u.path); in dump_common_audit_data()
227 audit_log_format(ab, " dev="); in dump_common_audit_data()
228 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data()
229 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data()
236 audit_log_d_path(ab, " path=", &a->u.file->f_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()
249 audit_log_d_path(ab, " path=", &a->u.op->path); in dump_common_audit_data()
253 audit_log_format(ab, " dev="); in dump_common_audit_data()
254 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data()
255 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data()
258 audit_log_format(ab, " ioctlcmd=0x%hx", a->u.op->cmd); in dump_common_audit_data()
264 audit_log_format(ab, " name="); in dump_common_audit_data()
266 audit_log_untrustedstring(ab, a->u.dentry->d_name.name); in dump_common_audit_data()
271 audit_log_format(ab, " dev="); in dump_common_audit_data()
272 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data()
273 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data()
285 audit_log_format(ab, " name="); in dump_common_audit_data()
287 audit_log_untrustedstring(ab, dentry->d_name.name); in dump_common_audit_data()
290 audit_log_format(ab, " dev="); in dump_common_audit_data()
291 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data()
292 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data()
302 audit_log_format(ab, " opid=%d ocomm=", pid); in dump_common_audit_data()
303 audit_log_untrustedstring(ab, in dump_common_audit_data()
321 print_ipv4_addr(ab, inet->inet_rcv_saddr, in dump_common_audit_data()
324 print_ipv4_addr(ab, inet->inet_daddr, in dump_common_audit_data()
333 print_ipv6_addr(ab, &sk->sk_v6_rcv_saddr, in dump_common_audit_data()
336 print_ipv6_addr(ab, &sk->sk_v6_daddr, in dump_common_audit_data()
348 audit_log_d_path(ab, " path=", &u->path); in dump_common_audit_data()
353 audit_log_format(ab, " path="); in dump_common_audit_data()
355 audit_log_untrustedstring(ab, p); in dump_common_audit_data()
357 audit_log_n_hex(ab, p, len); in dump_common_audit_data()
364 print_ipv4_addr(ab, a->u.net->v4info.saddr, in dump_common_audit_data()
367 print_ipv4_addr(ab, a->u.net->v4info.daddr, in dump_common_audit_data()
372 print_ipv6_addr(ab, &a->u.net->v6info.saddr, in dump_common_audit_data()
375 print_ipv6_addr(ab, &a->u.net->v6info.daddr, in dump_common_audit_data()
386 audit_log_format(ab, " netif=%s", dev->name); in dump_common_audit_data()
393 audit_log_format(ab, " key_serial=%u", a->u.key_struct.key); in dump_common_audit_data()
395 audit_log_format(ab, " key_desc="); in dump_common_audit_data()
396 audit_log_untrustedstring(ab, a->u.key_struct.key_desc); in dump_common_audit_data()
401 audit_log_format(ab, " kmod="); in dump_common_audit_data()
402 audit_log_untrustedstring(ab, a->u.kmod_name); in dump_common_audit_data()
411 audit_log_format(ab, " pkey=0x%x subnet_prefix=%pI6c", in dump_common_audit_data()
416 audit_log_format(ab, " device=%s port_num=%u", in dump_common_audit_data()
421 audit_log_format(ab, " lockdown_reason=\"%s\"", in dump_common_audit_data()
425 audit_log_format(ab, " anonclass=%s", a->u.anonclass); in dump_common_audit_data()
443 struct audit_buffer *ab; in common_lsm_audit() local
448 ab = audit_log_start(audit_context(), GFP_ATOMIC | __GFP_NOWARN, in common_lsm_audit()
451 if (ab == NULL) in common_lsm_audit()
455 pre_audit(ab, a); in common_lsm_audit()
457 dump_common_audit_data(ab, a); in common_lsm_audit()
460 post_audit(ab, a); in common_lsm_audit()
462 audit_log_end(ab); in common_lsm_audit()