ptp4l_selinux(8)
π ptp4l_selinux β the SELinux glow-up for your ptp4l processes π
okay so bestie, listen. this is the manual page for ptp4l_selinux, and it's basically the ~vibe check~ for how Security-Enhanced Linux keeps an eye on your ptp4l processes. no cap, it's lowkey iconic. let's get into it β¨
πΈ NAME πΈ
ptp4l_selinux β Security Enhanced Linux Policy for the ptp4l processes. that's it, that's the whole name. slay π
π¦ DESCRIPTION π¦
Security-Enhanced Linux secures the ptp4l processes via flexible mandatory access control. yes bestie, mandatory. not optional. that's the whole point π«Ά
So the ptp4l processes execute with the ptp4l_t SELinux type. wanna check if you've got these processes running? literally just run the ps command with the -Z qualifier. that's the move.
for example:
ps -eZ | grep ptp4l_t
that's it. so simple. love that for us π
β ENTRYPOINTS β
okay so here's how things get in. the ptp4l_t SELinux type can be entered via the ptp4l_exec_t file type. that's the doorway, bestie πͺβ¨
and the default entrypoint paths for the ptp4l_t domain are literally just:
/usr/bin/ptp4l
one path. one icon. main character energy fr fr π
π PROCESS TYPES π
so SELinux defines process types (aka domains) for each process running on the system. yep, every single one gets a little label. it's giving personalized name tags at a party π
you can see the context of a process using the -Z option to ps. easy peasy.
Policy governs the access confined processes have to files. and the SELinux ptp4l policy is very flexible β it allows users to set up their ptp4l processes in as secure a method as possible. that's the goal, always the goal π―
these are the process types defined for ptp4l:
ptp4l_t
Note:semanage permissive -a ptp4l_tcan be used to make the process typeptp4l_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's chill but it's still watching you π
β¨ BOOLEANS β¨
SELinux policy is customizable based on least access required β the whole "give them nothing and let them earn it" energy. and the ptp4l policy is extremely flexible, with several booleans that let you manipulate the policy and run ptp4l with the tightest access possible. tightest access = cleanest look, obviously.
okay so, boolean number one:
if you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on the daemons_dontaudit_scheduling boolean. it's enabled by default, bestie.
setsebool -P daemons_dontaudit_scheduling 1
and boolean number two:
if you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. also enabled by default π
setsebool -P fips_mode 1
two booleans, both already on. we love a low-maintenance queen π§
π MANAGED FILES π
so the SELinux process type ptp4l_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. and heads up β the process's UID still needs to have DAC permissions. SELinux isn't gonna override DAC for you, that's not how this works π
chronyd_tmpfs_tcluster_conf_t/etc/cluster(/.*)?
cluster_var_lib_t/var/lib/pcsd(/.*)?/var/lib/cluster(/.*)?/var/lib/openais(/.*)?/var/lib/pengine(/.*)?/var/lib/corosync(/.*)?/usr/lib/heartbeat(/.*)?/var/lib/heartbeat(/.*)?/var/lib/pacemaker(/.*)?
cluster_var_run_t/run/crm(/.*)?/run/cman_.*/run/rsctmp(/.*)?/run/aisexec.*/run/heartbeat(/.*)?/run/pcsd-ruby.socket/run/corosync-qnetd(/.*)?/run/corosync-qdevice(/.*)?/run/pcsd.socket/run/corosync.pid/run/cpglockd.pid/run/rgmanager.pid/run/cluster/rgmanager.sk
gpsd_tmpfs_troot_t/sysroot/.aleph-version.json/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?//initrd/var/lib/ntp
timemaster_tmpfs_ttimemaster_var_run_t/run/timemaster(/.*)?
look at all those. organised. gorgeous. no notes π
π FILE CONTEXTS π
SELinux requires files to have an extended attribute to define the file type. yes, an extended attribute. it's the file's whole personality okay π
you can see the context of a file using the -Z option to ls.
policy governs the access confined processes have to these files. and again, the SELinux ptp4l policy is very flexible, allowing users to set up their ptp4l processes in as secure a method as possible. consistency is key bestie π
π« STANDARD FILE CONTEXT π«
SELinux defines the file context types for the ptp4l. so if you wanted to store files with these types in different paths, you'd need to execute the semanage command to specify alternate labeling, and then use restorecon to put the labels on disk. two-step process, very demure.
semanage fcontext -a -t ptp4l_exec_t '/srv/ptp4l/content(/.*)?'
restorecon -R -v /srv/myptp4l_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise π§ββοΈ
the following file types are defined for ptp4l:
ptp4l_exec_tβ set files with theptp4l_exec_ttype, if you want to transition an executable to theptp4l_tdomain.ptp4l_unit_file_tβ set files with theptp4l_unit_file_ttype, if you want to treat the files asptp4lunit content.
Note: file context can be temporarily modified with thechconcommand. but if you want to permanently change the file context you need to use thesemanage fcontextcommand. this will modify the SELinux labeling database. and then you'll need to userestoreconto apply the labels. temporary vs permanent, know the difference bestie π
π₯ COMMANDS π₯
here's the tool lineup, the whole crew:
semanage fcontextcan also be used to manipulate default file context mappings.semanage permissivecan also be used to manipulate whether or not a process type is permissive.semanage modulecan also be used to enable/disable/install/remove policy modules.semanage booleancan also be used to manipulate the booleans.system-config-selinuxis a GUI tool available to customize SELinux policy settings. yes, a GUI. for the visual learners π¨
π AUTHOR π
this manual page was auto-generated using sepolicy manpage. no human wrote this, a script did, and honestly? it ate π€β¨
π«Ά SEE ALSO π«Ά
selinux(8), ptp4l(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
like, go read those too. iykyk π
and that's the whole page, bestie! this one came from ptp4l, version 26-10-06 (dated ptp4l_selinux(8)), so shoutout to that exact moment in time for bringing us this masterpiece. periodt. π
β¨π
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms