Lines Matching refs:file
12 #include <linux/file.h>
133 void ima_add_violation(struct file *file, const unsigned char *filename,
138 struct inode *inode = file_inode(file);
140 .file = file,
212 * On failure, 'measure' policy rules will result in a file data
220 * Unlike in the case of actually calculating the file hash, in
232 * ima_collect_measurement - collect file measurement
234 * Calculate the file hash, if it doesn't already exist,
241 int ima_collect_measurement(struct ima_iint_cache *iint, struct file *file,
246 struct inode *inode = file_inode(file);
247 struct inode *real_inode = d_real_inode(file_dentry(file));
260 * the file digest without collecting the modsig in a previous
270 * Detecting file change is based on i_version. On filesystems
273 * assume the file changed.
275 result = vfs_getattr_nosec(&file->f_path, &stat, STATX_CHANGE_COOKIE,
293 result = ima_calc_file_hash(file, hash_hdr);
319 if (file->f_flags & O_DIRECT)
322 take_dentry_name_snapshot(&filename, file->f_path.dentry);
334 * ima_store_measurement - store file measurement
341 * - multiple copies of the same file on either the same or
348 void ima_store_measurement(struct ima_iint_cache *iint, struct file *file,
357 struct inode *inode = file_inode(file);
360 .file = file,
370 * appraisal, but a file measurement from earlier might already exist in
384 if ((!result || result == -EEXIST) && !(file->f_flags & O_DIRECT)) {
416 audit_log_format(ab, "file=");