ima_file_check(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

ima_file_check β€” based on policy, collect/store measurement. ✨

okay hi bestie 🫢 this is the ima_file_check(9) page from the Kernel API Manual, and it's lowkey iconic for one very specific job: measuring files based on policy. let's get into it.

🌸 SYNOPSIS 🌸

int ima_file_check (struct file *file , int mask );

πŸŽ€ ARGUMENTS πŸŽ€

  • file β€” pointer to the file to be measured. yes bestie, the actual file.
  • mask β€” contains MAY_READ, MAY_WRITE, MAY_EXEC or MAY_APPEND. those are the flags in the mix.

✨ DESCRIPTION ✨

Measure files based on the ima_must_measure policy decision. that's the whole vibe: the policy decision is doing its thing, and this is the file-checking moment.

On success return 0. On integrity appraisal error, assuming the file is in policy and IMA-appraisal is in enforcing mode, return -EACCES.

bestie the caveat is important: that -EACCES return is tied to integrity appraisal error plus the file being in policy plus IMA-appraisal being in enforcing mode. periodt.

πŸ‘€ SEE ALSO πŸ‘€

Kernel file: ./security/integrity/ima/ima_main.c


okay that's the page, bestie 🫢 source/version: ./security/integrity/ima; date: October 2026; title: ima_file_check(9). mwah πŸ’…

πŸ“¦ where this page comes from