setenforce(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

setenforce(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” today’s main character is setenforce, and she is literally the write handler for the securityfs node, "ipe/enforce" πŸ‘‘βœ¨. no cap.


NAME 🌸

setenforce β€” Write handler for the securityfs node, "ipe/enforce" πŸ’–

SYNOPSIS πŸ¦‹

ssize_t setenforce (struct file *f , const char __user *data , size_t
       len , loff_t *offset );

ARGUMENTS πŸŽ€

  • f β€” Supplies a file structure representing the securityfs node. 🫢
  • data β€” Supplies a buffer passed to the write syscall. πŸ“
  • len β€” Supplies the length of data. πŸ“
  • offset β€” unused. literally not invited to the party πŸ’€

RETURN πŸ”₯

  • Length of buffer written β€” Success, slay βœ…
  • -EPERM β€” Insufficient permission, so no ❌

SEE ALSO πŸ‘‘

check out the Kernel file ./security/ipe/fs.c β€” and these other faves: setaudit(9), getaudit(9), getenforce(9), new_policy(9), ipe_init_securityfs(9) 🌈.


xoxo, your ./security/ipe bestie, October 2026 edition πŸŽ€πŸ’œ

πŸ“¦ where this page comes from