Skip to content

Commit

Permalink
Confine the pcm service
Browse files Browse the repository at this point in the history
  • Loading branch information
zpytela committed Oct 11, 2024
1 parent 8663090 commit ad74dd8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
10 changes: 9 additions & 1 deletion dist/targeted/modules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3022,9 +3022,17 @@ systemd-homed = module
#
iiosensorproxy = module

# Layer: system
# Layer: contrib
# Module: powerprofiles
#
# Policy for power-profiles-daemon - power profiles handling over D-Bus
#
powerprofiles = module

# Layer: contrib
# Module: pcm
#
# Policy for pcm - Intel(r) Performance Counter Monitor
#
#
pcm = module
1 change: 1 addition & 0 deletions policy/modules/contrib/pcm.fc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/usr/sbin/pcm-sensor-server -- gen_context(system_u:object_r:pcmsensor_exec_t,s0)
1 change: 1 addition & 0 deletions policy/modules/contrib/pcm.if
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## <summary>Intel Performance Counter Monitor (PCM) Sensor Service</summary>
18 changes: 18 additions & 0 deletions policy/modules/contrib/pcm.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
policy_module(pcmsensor, 1.0)

########################################
#
# Declarations
#

type pcmsensor_t;
type pcmsensor_exec_t;
init_daemon_domain(pcmsensor_t, pcmsensor_exec_t)
#init_nnp_daemon_domain(pcmsensor_t)

#type pcmsensor_var_lib_t;
#files_type(pcmsensor_var_lib_t);

permissive pcmsensor_t;


0 comments on commit ad74dd8

Please sign in to comment.