smk_copy_rules(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… smk_copy_rules(9) β€” Kernel API Manual

okay so bestie, welcome to the kernel API manual ✨ this one's a lil function called smk_copy_rules, and honestly? the name ate. it literally copies a rule set. that's it. that's the vibe πŸŽ€


🌸 NAME 🌸

smk_copy_rules β€” copy a rule set πŸ’–


✨ SYNOPSIS ✨

int smk_copy_rules (struct list_head *nhead , struct list_head *ohead ,
gfp_t gfp );

like look at her. three params, one int, zero drama 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • nhead β€” the new rules header pointer πŸ‘‘ this is where the copied ruleset is headed, main character destination fr
  • ohead β€” the old rules header pointer 🌸 this is the og ruleset, the one getting copied from, respect her legacy
  • gfp β€” the type of the memory for the allocation 🧚 like which memory flags you're allocating with, iykyk

πŸ’œ DESCRIPTION πŸ’œ

Returns 0 on success, -ENOMEM on error 😭

that's the whole description. no cap. she's short, she's sweet, she's giving minimalist icon. if it works you get a lil 0, and if the memory allocation falls through you get -ENOMEM and a vibe check failure πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

okay so this is the part where the manpage goes absolutely feral β€” the reference list is huge and we are NOT skipping a single one, bestie πŸ’… all in the kernel file ./security/smack/smack_lsm.c:

like?? that's the whole friend group showing up to the function's birthday party πŸŽ‚ every single one of them, no gatekeeping πŸ’–


πŸ’€ real talk though: the description only promises 0 on success and -ENOMEM on error β€” don't be out here inventing extra return codes, bestie. that's the documented lore, periodt.

okay that's the page!! and for the cute sign-off: this lil beauty lives under the source dir ./security/smack, and it's dated October 2026 πŸ¦‹ so mark your calendars, she's a future icon πŸ‘‘βœ¨ love that for her, and love that for you for reading this far πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from