/security/ |
D | lsm_audit.c | 184 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/ |
D | integrity_audit.c | 41 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/ |
D | audit.c | 55 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 …]
|
D | mount.c | 27 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 …]
|
D | ipc.c | 43 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 …]
|
D | net.c | 71 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 …]
|
D | lib.c | 221 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 …]
|
D | resource.c | 30 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()
|
D | capability.c | 44 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()
|
D | file.c | 44 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()
|
D | policy_unpack.c | 78 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()
|
D | label.c | 1735 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()
|
D | policy.c | 597 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/ |
D | evm_secfs.c | 185 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/ |
D | ima_policy.c | 1099 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 …]
|
D | ima_api.c | 352 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/ |
D | smack_access.c | 311 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/ |
D | avc.c | 672 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 …]
|
D | hooks.c | 3310 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/ |
D | perms.h | 138 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,
|
D | net.h | 91 void audit_net_cb(struct audit_buffer *ab, void *va);
|
D | label.h | 318 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/ |
D | services.c | 472 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 …]
|