Lines Matching defs:ab
68 * @ab: Supplies a pointer to the audit_buffer to append to.
71 static void audit_dmv_roothash(struct audit_buffer *ab, const void *rh)
73 audit_log_format(ab, "%s", audit_prop_names[IPE_PROP_DMV_ROOTHASH]);
74 ipe_digest_audit(ab, rh);
79 * @ab: Supplies a pointer to the audit_buffer to append to.
82 static void audit_fsv_digest(struct audit_buffer *ab, const void *d)
84 audit_log_format(ab, "%s", audit_prop_names[IPE_PROP_FSV_DIGEST]);
85 ipe_digest_audit(ab, d);
90 * @ab: Supplies a pointer to the audit_buffer to append to.
93 static void audit_rule(struct audit_buffer *ab, const struct ipe_rule *r)
97 audit_log_format(ab, " rule=\"op=%s ", audit_op_names[r->op]);
102 audit_dmv_roothash(ab, ptr->value);
105 audit_fsv_digest(ab, ptr->value);
108 audit_log_format(ab, "%s", audit_prop_names[ptr->type]);
112 audit_log_format(ab, " ");
115 audit_log_format(ab, "action=%s\"", ACTSTR(r->action));
133 struct audit_buffer *ab;
139 ab = audit_log_start(audit_context(), GFP_ATOMIC | __GFP_NOWARN,
141 if (!ab)
144 audit_log_format(ab, "ipe_op=%s ipe_hook=%s enforcing=%d pid=%d comm=",
147 audit_log_untrustedstring(ab, get_task_comm(comm, current));
150 audit_log_d_path(ab, " path=", &ctx->file->f_path);
153 audit_log_format(ab, " dev=");
154 audit_log_untrustedstring(ab, inode->i_sb->s_id);
155 audit_log_format(ab, " ino=%lu", inode->i_ino);
157 audit_log_format(ab, " dev=? ino=?");
160 audit_log_format(ab, " path=? dev=? ino=?");
164 audit_rule(ab, r);
166 audit_log_format(ab, " rule=\"DEFAULT op=%s action=%s\"", op,
169 audit_log_format(ab, " rule=\"DEFAULT action=%s\"",
172 audit_log_end(ab);
176 * audit_policy() - Audit a policy's name, version and thumbprint to @ab.
177 * @ab: Supplies a pointer to the audit buffer to append to.
181 static void audit_policy(struct audit_buffer *ab,
189 audit_log_format(ab, audit_format, p->parsed->name,
192 audit_log_n_hex(ab, digest, sizeof(digest));
203 struct audit_buffer *ab;
205 ab = audit_log_start(audit_context(), GFP_KERNEL,
207 if (!ab)
211 audit_policy(ab, AUDIT_OLD_ACTIVE_POLICY_FMT, op);
212 audit_log_format(ab, " ");
218 audit_log_format(ab, AUDIT_OLD_ACTIVE_POLICY_NULL_FMT);
219 audit_log_format(ab, " ");
221 audit_policy(ab, AUDIT_NEW_ACTIVE_POLICY_FMT, np);
222 audit_log_format(ab, " auid=%u ses=%u lsm=ipe res=1",
226 audit_log_end(ab);
235 struct audit_buffer *ab;
238 ab = audit_log_start(audit_context(), GFP_KERNEL,
240 if (!ab)
244 audit_policy(ab, AUDIT_POLICY_LOAD_FMT, p);
246 audit_log_format(ab, AUDIT_POLICY_LOAD_NULL_FMT);
250 audit_log_format(ab, " auid=%u ses=%u lsm=ipe res=%d errno=%d",
254 audit_log_end(ab);
264 struct audit_buffer *ab;
266 ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_MAC_STATUS);
267 if (!ab)
277 audit_log_end(ab);