seinfo(1)

πŸ“¦
version 4.7.1 Β· 3 versions
, in centos-stream 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– seinfo β€” SELinux policy information tool πŸ’–

okay bestie, welcome to seinfo(1) β€” she's part of SETools: SELinux Policy Analysis Tools and she's literally the friend who knows everything about your SELinux policy πŸ’…


✨ NAME ✨

seinfo β€” SELinux policy information tool 🌸


✨ SYNOPSIS ✨

seinfo [OPTIONS] [EXPRESSION] [POLICY]

✨ DESCRIPTION ✨

seinfo lets you, yes you, query the components of a SELinux policy. that's it, that's the vibe. she asks the policy questions and the policy answers 🫢


πŸŽ€ POLICY πŸŽ€

a single file containing a binary policy. on Linux systems this file is usually named by version, for example, policy.30. on Android systems it's usually named sepolicy.

if you don't hand her a policy file, seinfo will go looking for the policy that's running on the current system. and if no policy can be found at all? she prints an error message and exits. no policy, no party πŸ’€


πŸ¦‹ EXPRESSIONS πŸ¦‹

you can query one or more of these component types. and if you give her no expressions at all, she just prints policy statistics. a lil treat ✨

  • -a [ATTR], --attribute [ATTR] β€” print a list of type attributes, or, if ATTR is provided, print the named attribute. with -x, print a list of types assigned to each displayed attribute πŸ‘‘
  • -b [BOOL], --bool [BOOL] β€” print a list of Booleans, or, if BOOL is provided, print the named boolean. with -x, print the statement of each displayed conditional boolean.
  • -c [CLASS], --class [CLASS] β€” print a list of object classes, or, if CLASS is provided, print the named object class. with -x, print a list of permissions for each displayed object class.
  • -r [ROLE], --role [ROLE] β€” print a list of roles, or, if NAME is provided, print the named role. with -x, print the statement for each displayed role.
  • -t [TYPE], --type [TYPE] β€” print a list of types, or, if TYPE is provided, print the named type. with -x, print a list of attributes which include each displayed type.
  • -u [USER], --user [USER] β€” print a list of users, or, if USER is provided, print the named user. with -x, print a list of statement for each displayed user.
  • --category [CAT] β€” print a list of categories, or, if CAT is provided, print the named category. with -x, print a list of sensitivities with which each displayed category may be associated.
  • --common [COMMON] β€” print a list of common permission sets, or, if COMMON is provided, print the named common. with -x, print a list of permissions in the set.
  • --constrain [CLASS] β€” print a list of constraints and MLS constraints statements, or, if CLASS is provided, print all constraints for the named object class. there is no expanded information for this component, so don't come for her about it πŸ™ˆ
  • --default [CLASS] β€” print a list of default_* statements, or, if CLASS is provided, print all default_* statements for the named object class. there is no expanded information for this component.
  • --fs_use [FS_TYPE] β€” print a list of fs_use_* statements, or, if FS_TYPE is provided, print the statement for the named filesystem type. there is no expanded information for this component.
  • --genfscon [FS_TYPE] β€” print a list of genfscon statements, or, if FS_TYPE is provided, print the statement for the named filesystem type. there is no expanded information for this component.
  • --ibpkeycon [PKEY[-PKEY]] β€” print a list of InfiniBand partition key contexts. 🌈
  • --ibendportcon [NAME] β€” print a list of InfiniBand endport contexts. 🌈
  • --initialsid [NAME] β€” print a list of initial SIDs, or, if NAME is provided, print the named initial SID. with -x, print the context assigned to each displayed SID.
  • --netifcon [DEVICE] β€” print a list of netif contexts, or, if DEVICE is provided, print the named statement for the interface. there is no expanded information for this component.
  • --nodecon [ADDR] β€” print a list of node contexts, or, if ADDR is provided, print the named statement for the node with address. there is no expanded information for this component.
  • --permissive [TYPE] β€” print permissive types, or, if TYPE is specified, print the named statement if it is permissive. there is no expanded information for this component.
  • --polcap [NAME] β€” print policy capabilities, or, if NAME is specified, print the named capability, if enabled. with -x, print the statement.
  • --portcon [PORTNUM[-PORTNUM]] β€” print a list of port contexts, or, if PORT or PORT range is provided, print the named statement for the port/port range. there is no expanded information for this component.
  • --sensitivity [SENS] β€” print a list of sensitivities, or, if SENS is provided, print the named sensitivity. with -x, print the statement for each sensitivity.
  • --typebounds [BOUND_TYPE] β€” print a list of typebounds statements, or, if BOUND_TYPE is provided, print the statement for the named bound type. there is no expanded information for this component.
  • --validatetrans [CLASS] β€” print a list of validatetrans and MLS validatetrans rules, or, if CLASS is provided, print all constraints for the named object class. there is no expanded information for this component.
  • --all β€” print all components. the "give me everything" button. she ate πŸ“

πŸ‘‘ Xen Component Queries πŸ‘‘

these ones are Xen-only, bestie, no cap:

  • --ioportcon β€” print all ioportcon statements.
  • --iomemcon β€” print all iomemcon statements.
  • --pcidevicecon β€” print all pcidevicecon statements.
  • --pirqcon β€” print all pirqcon statements.
  • --devicetreecon β€” print all devicetreecon statements.

πŸ’… OPTIONS πŸ’…

  • -x, --expand β€” print additional details for each component matching the expression. check the description of each component above to see what extra tea this option spills.
  • --flat β€” exclude headers and indentation in output. clean, minimal, lowkey aesthetic ✨
  • -h, --help β€” print help information and exit.
  • --version β€” print version information and exit.
  • -v, --verbose β€” print additional informational messages. she's chatty, we love that for her.
  • --debug β€” enable debugging output.

🌸 EXAMPLE 🌸

list aliases of and attributes assigned to type httpd_t:

# seinfo -t httpd_t -x

list all executable types (all types assigned to "exec_type" attribute):

# seinfo -a exec_type -x

list all constrains and mlsconstrains for class "file":

# seinfo --constrain file

πŸ’œ AUTHOR πŸ’œ

Chris PeBenito <pebenito@ieee.org> β€” icon behavior, honestly 🫢


😭 BUGS 😭

please report bugs via the SETools bug tracker, https://github.com/SELinuxProject/setools/issues

(if something's broken, tell the tracker, don't suffer in silence, bestie)


🌈 SEE ALSO 🌈

apol(1), sediff(1), sedta(1), seinfoflow(1), sesearch(1) β€” the whole friend group, go say hi πŸ’–


and that's the page, babe πŸŽ€ this was the SELinux Project edition, dated 2016-02-20, and yes she's still serving. mwah πŸ’‹