selinuxexeccon(8)

✨ selinuxexeccon β€” the manual page, bestie edition ✨

okay so you found selinuxexeccon, part of the SELinux Command Line documentation situation, and honestly? it's giving one job, done perfectly. section 8 energy, system admin realness, no notes. let's get into it πŸ’…


πŸŽ€ NAME πŸŽ€

selinuxexeccon β€” report SELinux context used for this executable

like, it tells you which SELinux context a given executable gets run in. that's the whole vibe. short, sweet, iconic πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

selinuxexeccon command [fromcon]

so it's command, and then optionally a fromcon. two things. we love a minimal interface 🌸


πŸ’– DESCRIPTION πŸ’–

selinuxexeccon reports the SELinux process context for the specified command, computed from the specified context β€” or, if you didn't hand it one, from the current context.

basically: "hey, if I run this thing from here, what context am I gonna land in?" and it's like "here bestie, here's your answer" ✨


🌈 EXAMPLE 🌈

run it on a bare command and it reads your current context, no cap:

# selinuxexeccon /usr/bin/passwd
staff_u:staff_r:passwd_t:s0-s0:c0.c1023

and now the upgraded version β€” you feed it a fromcon and it tells you the context you'd get from there instead:

# selinuxexeccon /usr/sbin/sendmail system_u:system_r:httpd_t:s0
system_u:system_r:system_mail_t:s0

see how the fromcon changed the answer?? that's the whole point of the second argument, and it ate πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

This manual page was written by Dan Walsh <dwalsh@redhat.com>. legend behaviour fr fr 🫢


🧚 SEE ALSO 🧚

  • secon(8) β€” go read that one too, iykyk

ngl there is no extra secret sauce here β€” no flags, no env vars, no exit status lore, no bug notes. just a command, an optional context, and the truth. periodt πŸ’œ

and that's the whole page!! this lil beauty came from dwalsh@redhat.com and is dated 14 May 2011 β€” yeah she's an elder but she's still slaying, we stan a timeless classic πŸŽ€β­ bye bestie, go check your contexts πŸ’–