semanage_seuser(3)

πŸ“¦
version 3.11 Β· 2 versions
, in centos-stream 10, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– semanage_seuser β€” the manual page, but make it cute πŸ’–

okay bestie, pull up a chair πŸͺ‘ because we're talking about semanage_seuser(3), aka the Linux UID to SELinux User Management API from the Libsemanage API documentation. yes it's a mouthful. yes it's iconic. let's get into it πŸ’…


✨ NAME ✨

semanage_seuser β€” the Linux UID to SELinux User Management API 🫢


✨ SYNOPSIS ✨

#include <semanage/seuser_record.h>
#include <semanage/seusers_policy.h>
#include <semanage/seusers_local.h>

so this object is holding all the properties that go with a Unix user. and here's the tea: normally a whole bunch of Unix users get mapped to the same SELinux user. that's just how it is, no cap. if you want the big-picture overview of the SELinux user API, go read semanage_user(3) πŸ’–

and if you wanna know the details on any one specific function? each one has its own manual page, so go look it up, iykyk ✨


🌸 Record API Overview 🌸

these are the record girlies β€” creating, freeing, keying, cloning, comparing. the whole friend group πŸ’…

  • semanage_seuser_create(3) β€” creates a seuser ✨
  • semanage_seuser_free(3) β€” releases the resources for this seuser πŸŽ€
  • semanage_seuser_key_create(3) β€” creates a key, which you can use to identify a seuser πŸ”‘
  • semanage_seuser_key_free(3) β€” releases the resources for this seuser key 🫢
  • semanage_seuser_key_extract(3) β€” creates a key that matches this seuser πŸ’–
  • semanage_seuser_clone(3) β€” creates an identical seuser (it's a deep-copy clone, so like, a real twin, not a shallow one πŸ’€)
  • semanage_seuser_compare(3) β€” compares this seuser to the key you provided πŸ¦‹
  • semanage_seuser_compare2(3) β€” compares this seuser to another seuser πŸ‘―

πŸŽ€ Properties API Overview πŸŽ€

get / set energy. names, senames, MLS ranges. the glow-up section ✨

  • semanage_seuser_get_name(3) β€” returns the name of this seuser πŸ’œ
  • semanage_user_set_name(3) β€” sets the name of this seuser πŸ–ŠοΈ
  • semanage_seuser_get_sename(3) β€” returns the name of the (SELinux) user that's mapped to this seuser 🌈
  • semanage_user_set_sename(3) β€” sets the name of the (SELinux) user that's mapped to this seuser πŸ–ŠοΈ
  • semanage_user_get_mlsrange(3) β€” returns a the range of valid MLS sensitivities and categories for this user πŸ“
  • semanage_user_set_mlsrange(3) β€” sets the range of valid MLS sensitivities and categories for this user πŸ“

πŸ‘‘ Record Store API Overview πŸ‘‘

the local store vs the persistent policy. two worlds, one API. main character energy fr fr πŸ’…

lowkey obsessed with how consistent this API is. every single function has a local twin. sibling energy πŸ‘―πŸ’–

and that's the whole page, bestie!! 🌈✨ this absolute banger of a manpage was brought to you by ivg2@cornell.edu, dated 16 March 2006 πŸŽ€ β€” shoutout to the Libsemanage API documentation for the lore, and to you for reading all the way to the end. mwah πŸ’‹πŸ«Ά