selinux-policy/policy/modules/services/gpsd.if

73 lines
1.4 KiB
Plaintext
Raw Normal View History

2009-06-02 14:28:40 +00:00
## <summary>gpsd monitor daemon</summary>
########################################
## <summary>
2009-06-26 14:40:13 +00:00
## Execute a domain transition to run gpsd.
2009-06-02 14:28:40 +00:00
## </summary>
## <param name="domain">
## <summary>
2009-06-26 14:40:13 +00:00
## Domain allowed to transition.
2009-06-02 14:28:40 +00:00
## </summary>
## </param>
#
interface(`gpsd_domtrans',`
2009-06-26 14:40:13 +00:00
gen_require(`
type gpsd_t, gpsd_exec_t;
')
2009-06-02 14:28:40 +00:00
2009-06-26 14:40:13 +00:00
domtrans_pattern($1, gpsd_exec_t, gpsd_t)
2009-06-02 14:28:40 +00:00
')
########################################
## <summary>
2009-06-26 14:40:13 +00:00
## Execute gpsd in the gpsd domain, and
## allow the specified role the gpsd domain.
2009-06-02 14:28:40 +00:00
## </summary>
## <param name="domain">
2009-06-26 14:40:13 +00:00
## <summary>
## Domain allowed access
## </summary>
2009-06-02 14:28:40 +00:00
## </param>
## <param name="role">
2009-06-26 14:40:13 +00:00
## <summary>
## The role to be allowed the gpsd domain.
## </summary>
2009-06-02 14:28:40 +00:00
## </param>
## <param name="terminal">
2009-06-26 14:40:13 +00:00
## <summary>
## The type of the role's terminal.
## </summary>
2009-06-02 14:28:40 +00:00
## </param>
#
interface(`gpsd_run',`
2009-06-26 14:40:13 +00:00
gen_require(`
type gpsd_t;
')
2009-06-02 14:28:40 +00:00
2009-06-26 14:40:13 +00:00
gpsd_domtrans($1)
role $2 types gpsd_t;
allow gpsd_t $3:chr_file rw_term_perms;
2009-06-02 14:28:40 +00:00
')
########################################
## <summary>
2009-06-26 14:40:13 +00:00
## Read and write gpsd shared memory.
2009-06-02 14:28:40 +00:00
## </summary>
## <param name="domain">
2009-06-26 14:40:13 +00:00
## <summary>
## Domain allowed access.
## </summary>
2009-06-02 14:28:40 +00:00
## </param>
#
interface(`gpsd_rw_shm',`
2009-06-26 14:40:13 +00:00
gen_require(`
type gpsd_t, gpsd_tmpfs_t;
')
2009-06-02 14:28:40 +00:00
2009-06-26 14:40:13 +00:00
allow $1 gpsd_t:shm rw_shm_perms;
allow $1 gpsd_tmpfs_t:dir list_dir_perms;
rw_files_pattern($1, gpsd_tmpfs_t, gpsd_tmpfs_t)
read_lnk_files_pattern($1, gpsd_tmpfs_t, gpsd_tmpfs_t)
fs_search_tmpfs($1)
2009-06-02 14:28:40 +00:00
')