Skip to content

Commit

Permalink
Remove the linuxptp module sources
Browse files Browse the repository at this point in the history
The package now maintains its own selinux policy module.
  • Loading branch information
zpytela committed Oct 11, 2024
1 parent 52660d7 commit dca5983
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 278 deletions.
7 changes: 0 additions & 7 deletions dist/targeted/modules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2742,13 +2742,6 @@ mon_statd = module
#
cinder = module

# Layer: contrib
# Module: linuxptp
#
# linuxptp policy
#
linuxptp = module

# Layer: contrib
# Module: targetd
#
Expand Down
11 changes: 0 additions & 11 deletions policy/modules/contrib/linuxptp.fc

This file was deleted.

140 changes: 79 additions & 61 deletions policy/modules/contrib/linuxptp.if
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
## </summary>
## </param>
#
interface(`linuxptp_domtrans_phc2sys',`
gen_require(`
type phc2sys_t, phc2sys_exec_t;
ifndef(`linuxptp_domtrans_phc2sys',`
interface(`linuxptp_domtrans_phc2sys',`
gen_require(`
type phc2sys_t, phc2sys_exec_t;
')

corecmd_search_bin($1)
domtrans_pattern($1, phc2sys_exec_t, phc2sys_t)
')

corecmd_search_bin($1)
domtrans_pattern($1, phc2sys_exec_t, phc2sys_t)
')

########################################
Expand All @@ -29,13 +31,15 @@ interface(`linuxptp_domtrans_phc2sys',`
## </summary>
## </param>
#
interface(`linuxptp_domtrans_ptp4l',`
gen_require(`
type ptp4l_t, ptp4l_exec_t;
ifndef(`linuxptp_domtrans_ptp4l',`
interface(`linuxptp_domtrans_ptp4l',`
gen_require(`
type ptp4l_t, ptp4l_exec_t;
')

corecmd_search_bin($1)
domtrans_pattern($1, ptp4l_exec_t, ptp4l_t)
')

corecmd_search_bin($1)
domtrans_pattern($1, ptp4l_exec_t, ptp4l_t)
')
######################################
## <summary>
Expand All @@ -48,13 +52,15 @@ interface(`linuxptp_domtrans_ptp4l',`
## </summary>
## </param>
#
interface(`timemaster_stream_connect',`
gen_require(`
type timemaster_t, timemaster_var_run_t;
')

files_search_pids($1)
stream_connect_pattern($1, timemaster_var_run_t, timemaster_var_run_t, timemaster_t)
ifndef(`timemaster_stream_connect',`
interface(`timemaster_stream_connect',`
gen_require(`
type timemaster_t, timemaster_var_run_t;
')

files_search_pids($1)
stream_connect_pattern($1, timemaster_var_run_t, timemaster_var_run_t, timemaster_t)
')
')

########################################
Expand All @@ -67,12 +73,14 @@ interface(`timemaster_stream_connect',`
## </summary>
## </param>
#
interface(`timemaster_read_pid_files',`
gen_require(`
type timemaster_var_run_t;
')
ifndef(`timemaster_read_pid_files',`
interface(`timemaster_read_pid_files',`
gen_require(`
type timemaster_var_run_t;
')

read_files_pattern($1, timemaster_var_run_t, timemaster_var_run_t)
read_files_pattern($1, timemaster_var_run_t, timemaster_var_run_t)
')
')

########################################
Expand All @@ -85,12 +93,14 @@ interface(`timemaster_read_pid_files',`
## </summary>
## </param>
#
interface(`timemaster_manage_pid_sock_files',`
gen_require(`
type timemaster_var_run_t;
')
ifndef(`timemaster_manage_pid_sock_files',`
interface(`timemaster_manage_pid_sock_files',`
gen_require(`
type timemaster_var_run_t;
')

manage_sock_files_pattern($1, timemaster_var_run_t, timemaster_var_run_t)
manage_sock_files_pattern($1, timemaster_var_run_t, timemaster_var_run_t)
')
')

########################################
Expand All @@ -103,16 +113,18 @@ interface(`timemaster_manage_pid_sock_files',`
## </summary>
## </param>
#
interface(`timemaster_rw_shm',`
gen_require(`
type timemaster_t, timemaster_tmpfs_t;
ifndef(`timemaster_rw_shm',`
interface(`timemaster_rw_shm',`
gen_require(`
type timemaster_t, timemaster_tmpfs_t;
')

allow $1 timemaster_t:shm rw_shm_perms;
list_dirs_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
rw_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
read_lnk_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
fs_search_tmpfs($1)
')

allow $1 timemaster_t:shm rw_shm_perms;
list_dirs_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
rw_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
read_lnk_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
fs_search_tmpfs($1)
')

########################################
Expand All @@ -125,16 +137,18 @@ interface(`timemaster_rw_shm',`
## </summary>
## </param>
#
interface(`ptp4l_rw_shm',`
gen_require(`
type ptp4l_t, timemaster_tmpfs_t;
ifndef(`ptp4l_rw_shm',`
interface(`ptp4l_rw_shm',`
gen_require(`
type ptp4l_t, timemaster_tmpfs_t;
')

allow $1 ptp4l_t:shm rw_shm_perms;
list_dirs_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
rw_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
read_lnk_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
fs_search_tmpfs($1)
')

allow $1 ptp4l_t:shm rw_shm_perms;
list_dirs_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
rw_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
read_lnk_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
fs_search_tmpfs($1)
')

########################################
Expand All @@ -147,16 +161,18 @@ interface(`ptp4l_rw_shm',`
## </summary>
## </param>
#
interface(`phc2sys_rw_shm',`
gen_require(`
type phc2sys_t, timemaster_tmpfs_t;
ifndef(`phc2sys_rw_shm',`
interface(`phc2sys_rw_shm',`
gen_require(`
type phc2sys_t, timemaster_tmpfs_t;
')

allow $1 phc2sys_t:shm rw_shm_perms;
list_dirs_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
rw_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
read_lnk_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
fs_search_tmpfs($1)
')

allow $1 phc2sys_t:shm rw_shm_perms;
list_dirs_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
rw_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
read_lnk_files_pattern($1, timemaster_tmpfs_t, timemaster_tmpfs_t)
fs_search_tmpfs($1)
')

#######################################
Expand All @@ -169,10 +185,12 @@ interface(`phc2sys_rw_shm',`
## </summary>
## </param>
#
interface(`timemaster_service_status',`
gen_require(`
type timemaster_unit_file_t;
')
ifndef(`timemaster_service_status',`
interface(`timemaster_service_status',`
gen_require(`
type timemaster_unit_file_t;
')

allow $1 timemaster_unit_file_t:service status;
allow $1 timemaster_unit_file_t:service status;
')
')
Loading

0 comments on commit dca5983

Please sign in to comment.