mls_import_netlbl_cat(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mls_import_netlbl_cat β€” bestie, it's giving "import the MLS categories from NetLabel"

okay so real talk, this page lives in the Kernel API Manual (yes that's the manual name, we're fancy here ✨) and it's about one tiny little function that does one tiny little thing. but the way that it does it? flawless. let's get into it 🫢


✨ NAME ✨

mls_import_netlbl_cat β€” literally just importing the MLS categories from NetLabel, that's the whole vibe 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

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

that's it. three args. no cap. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • p β€” the policy. yes, THE policy. the main character of this whole operation πŸ‘‘
  • context β€” the security context. this is bestie number two, we're loading it up 🧚
  • secattr β€” the NetLabel security attributes. the source material, the icon, the moment πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

so what are we even doing here? we're copying the NetLabel security attributes straight into the SELinux context. slay. πŸ’…

but here's the lil plot twist β€” the NetLabel security attribute only contains a single MLS category. just one. only one. so we lowkey use that same one category for both the low and the high categories of the context. one category serving double duty, and honestly? it ate. πŸ”₯

returns zero on success, negative values on failure. that's the whole contract, no notes, periodt. 😭


🌈 SEE ALSO 🌈


fr fr bestie, if you forget everything else: one NetLabel category in, both low and high categories out. zero means success, negative means nope. that's the tea β˜•πŸ’€

mwah πŸ’œ this lil page lives in ./security/selinux/ss, it's the October 2026 edition, and it comes to you straight from the Kernel API Manual. stay hydrated, go read mls.c, and remember β€” negative return values are not a personality trait, they're a failure. bye bestie!! πŸŽ€βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from