Home
last modified time | relevance | path

Searched refs:ab (Results 1 – 23 of 23) sorted by relevance

/security/
Dlsm_audit.c184 static inline void print_ipv6_addr(struct audit_buffer *ab, in print_ipv6_addr() argument
189 audit_log_format(ab, " %s=%pI6c", name1, addr); in print_ipv6_addr()
191 audit_log_format(ab, " %s=%d", name2, ntohs(port)); in print_ipv6_addr()
194 static inline void print_ipv4_addr(struct audit_buffer *ab, __be32 addr, in print_ipv4_addr() argument
198 audit_log_format(ab, " %s=%pI4", name1, &addr); in print_ipv4_addr()
200 audit_log_format(ab, " %s=%d", name2, ntohs(port)); in print_ipv4_addr()
208 static void dump_common_audit_data(struct audit_buffer *ab, in dump_common_audit_data() argument
220 audit_log_format(ab, " pid=%d comm=", task_tgid_nr(current)); in dump_common_audit_data()
221 audit_log_untrustedstring(ab, memcpy(comm, current->comm, sizeof(comm))); in dump_common_audit_data()
227 audit_log_format(ab, " key=%d ", a->u.ipc_id); in dump_common_audit_data()
[all …]
/security/integrity/
Dintegrity_audit.c41 struct audit_buffer *ab; in integrity_audit_message() local
47 ab = audit_log_start(audit_context(), GFP_KERNEL, audit_msgno); in integrity_audit_message()
48 if (!ab) in integrity_audit_message()
50 audit_log_format(ab, "pid=%d uid=%u auid=%u ses=%u", in integrity_audit_message()
55 audit_log_task_context(ab); in integrity_audit_message()
56 audit_log_format(ab, " op=%s cause=%s comm=", op, cause); in integrity_audit_message()
57 audit_log_untrustedstring(ab, get_task_comm(name, current)); in integrity_audit_message()
59 audit_log_format(ab, " name="); in integrity_audit_message()
60 audit_log_untrustedstring(ab, fname); in integrity_audit_message()
63 audit_log_format(ab, " dev="); in integrity_audit_message()
[all …]
/security/apparmor/
Daudit.c55 static void audit_pre(struct audit_buffer *ab, void *ca) in audit_pre() argument
60 audit_log_format(ab, "apparmor=\"%s\"", in audit_pre()
65 audit_log_format(ab, " operation=\"%s\"", aad(sa)->op); in audit_pre()
69 audit_log_format(ab, " info=\"%s\"", aad(sa)->info); in audit_pre()
71 audit_log_format(ab, " error=%d", aad(sa)->error); in audit_pre()
81 audit_log_format(ab, " namespace="); in audit_pre()
82 audit_log_untrustedstring(ab, in audit_pre()
85 audit_log_format(ab, " profile="); in audit_pre()
86 audit_log_untrustedstring(ab, profile->base.hname); in audit_pre()
88 audit_log_format(ab, " label="); in audit_pre()
[all …]
Dmount.c27 static void audit_mnt_flags(struct audit_buffer *ab, unsigned long flags) in audit_mnt_flags() argument
30 audit_log_format(ab, "ro"); in audit_mnt_flags()
32 audit_log_format(ab, "rw"); in audit_mnt_flags()
34 audit_log_format(ab, ", nosuid"); in audit_mnt_flags()
36 audit_log_format(ab, ", nodev"); in audit_mnt_flags()
38 audit_log_format(ab, ", noexec"); in audit_mnt_flags()
40 audit_log_format(ab, ", sync"); in audit_mnt_flags()
42 audit_log_format(ab, ", remount"); in audit_mnt_flags()
44 audit_log_format(ab, ", mand"); in audit_mnt_flags()
46 audit_log_format(ab, ", dirsync"); in audit_mnt_flags()
[all …]
Dipc.c43 static void audit_ptrace_cb(struct audit_buffer *ab, void *va) in audit_ptrace_cb() argument
48 audit_log_format(ab, " requested_mask=\"%s\"", in audit_ptrace_cb()
52 audit_log_format(ab, " denied_mask=\"%s\"", in audit_ptrace_cb()
56 audit_log_format(ab, " peer="); in audit_ptrace_cb()
57 aa_label_xaudit(ab, labels_ns(aad(sa)->label), aad(sa)->peer, in audit_ptrace_cb()
162 static void audit_signal_cb(struct audit_buffer *ab, void *va) in audit_signal_cb() argument
167 audit_log_format(ab, " requested_mask=\"%s\"", in audit_signal_cb()
170 audit_log_format(ab, " denied_mask=\"%s\"", in audit_signal_cb()
175 audit_log_format(ab, "signal=unknown(%d)", in audit_signal_cb()
178 audit_log_format(ab, " signal=%s", sig_names[aad(sa)->signal]); in audit_signal_cb()
[all …]
Dnet.c71 void audit_net_cb(struct audit_buffer *ab, void *va) in audit_net_cb() argument
76 audit_log_format(ab, " family=\"%s\"", in audit_net_cb()
79 audit_log_format(ab, " family=\"unknown(%d)\"", in audit_net_cb()
82 audit_log_format(ab, " sock_type=\"%s\"", in audit_net_cb()
85 audit_log_format(ab, " sock_type=\"unknown(%d)\"", in audit_net_cb()
87 audit_log_format(ab, " protocol=%d", aad(sa)->net.protocol); in audit_net_cb()
90 audit_log_format(ab, " requested_mask="); in audit_net_cb()
91 aa_audit_perm_mask(ab, aad(sa)->request, NULL, 0, in audit_net_cb()
95 audit_log_format(ab, " denied_mask="); in audit_net_cb()
96 aa_audit_perm_mask(ab, aad(sa)->denied, NULL, 0, in audit_net_cb()
[all …]
Dlib.c221 void aa_audit_perm_names(struct audit_buffer *ab, const char * const *names, in aa_audit_perm_names() argument
230 audit_log_format(ab, fmt, names[i]); in aa_audit_perm_names()
239 void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs, in aa_audit_perm_mask() argument
244 audit_log_format(ab, "\""); in aa_audit_perm_mask()
248 audit_log_format(ab, "%s", str); in aa_audit_perm_mask()
250 audit_log_format(ab, " "); in aa_audit_perm_mask()
253 aa_audit_perm_names(ab, names, mask & namesmask); in aa_audit_perm_mask()
254 audit_log_format(ab, "\""); in aa_audit_perm_mask()
262 static void aa_audit_perms_cb(struct audit_buffer *ab, void *va) in aa_audit_perms_cb() argument
267 audit_log_format(ab, " requested_mask="); in aa_audit_perms_cb()
[all …]
Dresource.c30 static void audit_cb(struct audit_buffer *ab, void *va) in audit_cb() argument
34 audit_log_format(ab, " rlimit=%s value=%lu", in audit_cb()
37 audit_log_format(ab, " peer="); in audit_cb()
38 aa_label_xaudit(ab, labels_ns(aad(sa)->label), aad(sa)->peer, in audit_cb()
Dcapability.c44 static void audit_cb(struct audit_buffer *ab, void *va) in audit_cb() argument
48 audit_log_format(ab, " capname="); in audit_cb()
49 audit_log_untrustedstring(ab, capability_names[sa->u.cap]); in audit_cb()
Dfile.c44 static void file_audit_cb(struct audit_buffer *ab, void *va) in file_audit_cb() argument
53 audit_log_format(ab, " requested_mask=\"%s\"", str); in file_audit_cb()
58 audit_log_format(ab, " denied_mask=\"%s\"", str); in file_audit_cb()
61 audit_log_format(ab, " fsuid=%d", in file_audit_cb()
63 audit_log_format(ab, " ouid=%d", in file_audit_cb()
68 audit_log_format(ab, " target="); in file_audit_cb()
69 aa_label_xaudit(ab, labels_ns(aad(sa)->label), aad(sa)->peer, in file_audit_cb()
72 audit_log_format(ab, " target="); in file_audit_cb()
73 audit_log_untrustedstring(ab, aad(sa)->fs.target); in file_audit_cb()
Dpolicy_unpack.c78 static void audit_cb(struct audit_buffer *ab, void *va) in audit_cb() argument
83 audit_log_format(ab, " ns="); in audit_cb()
84 audit_log_untrustedstring(ab, aad(sa)->iface.ns); in audit_cb()
87 audit_log_format(ab, " name="); in audit_cb()
88 audit_log_untrustedstring(ab, aad(sa)->name); in audit_cb()
91 audit_log_format(ab, " offset=%ld", aad(sa)->iface.pos); in audit_cb()
Dlabel.c1735 void aa_label_xaudit(struct audit_buffer *ab, struct aa_ns *ns, in aa_label_xaudit() argument
1742 AA_BUG(!ab); in aa_label_xaudit()
1758 audit_log_n_hex(ab, str, len); in aa_label_xaudit()
1760 audit_log_n_string(ab, str, len); in aa_label_xaudit()
1812 void aa_label_audit(struct audit_buffer *ab, struct aa_label *label, gfp_t gfp) in aa_label_audit() argument
1816 aa_label_xaudit(ab, ns, label, FLAG_VIEW_SUBNS, gfp); in aa_label_audit()
Dpolicy.c597 static void audit_cb(struct audit_buffer *ab, void *va) in audit_cb() argument
602 audit_log_format(ab, " ns="); in audit_cb()
603 audit_log_untrustedstring(ab, aad(sa)->iface.ns); in audit_cb()
/security/integrity/evm/
Devm_secfs.c185 struct audit_buffer *ab; in evm_write_xattrs() local
198 ab = audit_log_start(audit_context(), GFP_KERNEL, in evm_write_xattrs()
200 if (!ab && IS_ENABLED(CONFIG_AUDIT)) in evm_write_xattrs()
222 audit_log_format(ab, "xattr="); in evm_write_xattrs()
223 audit_log_untrustedstring(ab, xattr->name); in evm_write_xattrs()
267 audit_log_format(ab, " res=0"); in evm_write_xattrs()
268 audit_log_end(ab); in evm_write_xattrs()
271 audit_log_format(ab, " res=%d", (err < 0) ? err : 0); in evm_write_xattrs()
272 audit_log_end(ab); in evm_write_xattrs()
/security/integrity/ima/
Dima_policy.c1099 static void ima_log_string_op(struct audit_buffer *ab, char *key, char *value, in ima_log_string_op() argument
1102 if (!ab) in ima_log_string_op()
1106 audit_log_format(ab, "%s>", key); in ima_log_string_op()
1108 audit_log_format(ab, "%s<", key); in ima_log_string_op()
1110 audit_log_format(ab, "%s=", key); in ima_log_string_op()
1111 audit_log_format(ab, "%s ", value); in ima_log_string_op()
1113 static void ima_log_string(struct audit_buffer *ab, char *key, char *value) in ima_log_string() argument
1115 ima_log_string_op(ab, key, value, NULL); in ima_log_string()
1300 struct audit_buffer *ab; in ima_parse_rule() local
1307 ab = integrity_audit_log_start(audit_context(), GFP_KERNEL, in ima_parse_rule()
[all …]
Dima_api.c352 struct audit_buffer *ab; in ima_audit_measurement() local
368 ab = audit_log_start(audit_context(), GFP_KERNEL, in ima_audit_measurement()
370 if (!ab) in ima_audit_measurement()
373 audit_log_format(ab, "file="); in ima_audit_measurement()
374 audit_log_untrustedstring(ab, filename); in ima_audit_measurement()
375 audit_log_format(ab, " hash=\"%s:%s\"", algo_name, hash); in ima_audit_measurement()
377 audit_log_task_info(ab); in ima_audit_measurement()
378 audit_log_end(ab); in ima_audit_measurement()
/security/smack/
Dsmack_access.c311 static void smack_log_callback(struct audit_buffer *ab, void *a) in smack_log_callback() argument
315 audit_log_format(ab, "lsm=SMACK fn=%s action=%s", in smack_log_callback()
318 audit_log_format(ab, " subject="); in smack_log_callback()
319 audit_log_untrustedstring(ab, sad->subject); in smack_log_callback()
320 audit_log_format(ab, " object="); in smack_log_callback()
321 audit_log_untrustedstring(ab, sad->object); in smack_log_callback()
323 audit_log_format(ab, " labels_differ"); in smack_log_callback()
325 audit_log_format(ab, " requested=%s", sad->request); in smack_log_callback()
/security/selinux/
Davc.c672 static void avc_audit_pre_callback(struct audit_buffer *ab, void *a) in avc_audit_pre_callback() argument
680 audit_log_format(ab, "avc: %s ", sad->denied ? "denied" : "granted"); in avc_audit_pre_callback()
683 audit_log_format(ab, " null"); in avc_audit_pre_callback()
689 audit_log_format(ab, " {"); in avc_audit_pre_callback()
694 audit_log_format(ab, " %s", perms[i]); in avc_audit_pre_callback()
702 audit_log_format(ab, " 0x%x", av); in avc_audit_pre_callback()
704 audit_log_format(ab, " } for "); in avc_audit_pre_callback()
713 static void avc_audit_post_callback(struct audit_buffer *ab, void *a) in avc_audit_post_callback() argument
727 audit_log_format(ab, " ssid=%d", sad->ssid); in avc_audit_post_callback()
729 audit_log_format(ab, " scontext=%s", scontext); in avc_audit_post_callback()
[all …]
Dhooks.c3310 struct audit_buffer *ab; in selinux_inode_setxattr() local
3325 ab = audit_log_start(audit_context(), in selinux_inode_setxattr()
3327 if (!ab) in selinux_inode_setxattr()
3329 audit_log_format(ab, "op=setxattr invalid_context="); in selinux_inode_setxattr()
3330 audit_log_n_untrustedstring(ab, value, audit_size); in selinux_inode_setxattr()
3331 audit_log_end(ab); in selinux_inode_setxattr()
6584 struct audit_buffer *ab; in selinux_setprocattr() local
6593 ab = audit_log_start(audit_context(), in selinux_setprocattr()
6596 if (!ab) in selinux_setprocattr()
6598 audit_log_format(ab, "op=fscreate invalid_context="); in selinux_setprocattr()
[all …]
/security/apparmor/include/
Dperms.h138 void aa_audit_perm_names(struct audit_buffer *ab, const char * const *names,
140 void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs,
Dnet.h91 void audit_net_cb(struct audit_buffer *ab, void *va);
Dlabel.h318 void aa_label_xaudit(struct audit_buffer *ab, struct aa_ns *ns,
324 void aa_label_audit(struct audit_buffer *ab, struct aa_label *label, gfp_t gfp);
/security/selinux/ss/
Dservices.c472 struct audit_buffer *ab; in security_dump_masked_av() local
508 ab = audit_log_start(audit_context(), in security_dump_masked_av()
510 if (!ab) in security_dump_masked_av()
513 audit_log_format(ab, "op=security_compute_av reason=%s " in security_dump_masked_av()
523 audit_log_format(ab, "%s%s", in security_dump_masked_av()
529 audit_log_end(ab); in security_dump_masked_av()
1669 struct audit_buffer *ab; in compute_sid_handle_invalid_context() local
1677 ab = audit_log_start(audit_context(), GFP_ATOMIC, AUDIT_SELINUX_ERR); in compute_sid_handle_invalid_context()
1678 if (!ab) in compute_sid_handle_invalid_context()
1680 audit_log_format(ab, in compute_sid_handle_invalid_context()
[all …]