mls_import_netlbl_cat(9)
π 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 π
- Kernel file
./security/selinux/ss/mls.cβ go read it, iykyk π mls_export_netlbl_lvl(9)mls_import_netlbl_lvl(9)mls_export_netlbl_cat(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms