16 #include "include/audit.h"
57 audit_log_string(ab, str);
72 audit_file_mask(ab, sa->aad->fs.request);
76 audit_file_mask(ab, sa->aad->fs.denied);
85 if (sa->aad->fs.target) {
123 if (
likely(!sa.aad->error)) {
130 sa.aad->fs.request &=
mask;
132 if (
likely(!sa.aad->fs.request))
137 sa.aad->fs.request = sa.aad->fs.request & ~perms->
allow;
139 if (sa.aad->fs.request & perms->
kill)
143 if ((sa.aad->fs.request & perms->
quiet) &&
146 sa.aad->fs.request &= ~perms->
quiet;
148 if (!sa.aad->fs.request)
152 sa.aad->fs.denied = sa.aad->fs.request & ~perms->
allow;
153 return aa_audit(type, profile, gfp, &sa, file_audit_cb);
162 static u32 map_old_perms(
u32 old)
249 *perms = compute_perms(dfa, state, cond);
262 if (d_unlinked(dentry) && dentry->
d_inode->i_nlink == 0)
287 error =
aa_path_name(path, flags, &buffer, &name, &info);
300 if (request & ~perms.
allow)
349 struct path *new_dir,
struct dentry *new_dentry)
351 struct path link = { new_dir->
mnt, new_dentry };
352 struct path target = { new_dir->
mnt, old_dentry };
383 if (!(lperms.
allow & AA_MAY_LINK))
387 state = aa_dfa_null_transition(profile->
file.dfa, state);
397 if (!(perms.
allow & AA_MAY_LINK)) {
398 info =
"target restricted";
413 request = lperms.
allow & ~AA_MAY_LINK;
417 if (request & ~lperms.
allow) {
423 info =
"link not subset of target";
432 lname, tname, cond.
uid, info, error);
452 .
uid = file->
f_path.dentry->d_inode->i_uid,
453 .mode = file->
f_path.dentry->d_inode->i_mode