mls_export_netlbl_cat(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mls_export_netlbl_cat(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so picture this: it's a kernel API manual page, section 9, and the star of the show is a little function called mls_export_netlbl_cat. she's lowkey iconic and honestly kind of a one-job girlie, but we stan. let's get into it ✨


🌸 NAME 🌸

mls_export_netlbl_cat β€” literally just exporting the MLS categories to NetLabel, that's the whole vibe πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

int mls_export_netlbl_cat (struct policydb *p , struct context *context
, struct netlbl_lsm_secattr *secattr );

no cap, that's the exact signature β€” copy it character for character or it will NOT compile, and we do not want that energy 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • p β€” the policy. yes, just "the policy", she's mysterious like that πŸ‘‘
  • context β€” the security context, the main character of this whole operation πŸ’–
  • secattr β€” the NetLabel security attributes, aka the destination where the good stuff goes 🧚

✨ DESCRIPTION ✨

so here's the tea: given the security context, this function copies the low MLS categories into the NetLabel MLS category field. that's it, that's the job. she copies, she slays, she leaves 🫢

and the return value? if it works you get zero back β€” success, we love to see it. if it doesn't, you get negative values, meaning failure, meaning something went sideways 😭

fr fr, anything negative = not the vibe. check it. always check it.

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./security/selinux/ss/mls.c πŸ’œ

like, go read those too, they're the rest of the friend group and they all ate πŸ’…


🌈 bye bestie 🌈

this page came out of ./security/selinux/ss, dated October 2026, and the manual name is mls_export_netlbl_cat(9) in case you forgot already πŸ™ˆ β€” anyway mwah, go export those categories, you're gonna do amazing πŸ’–βœ¨πŸ“

πŸ“¦ where this page comes from